NOTE THAT ((This should be done by R studio !)) This is can be done if the exper
ID: 3176094 • Letter: N
Question
NOTE THAT
((This should be done by R studio !))
This is can be done if the expert have a basic skills in R studio .
Please
a. Merge the two data files using R studio .
b. Read the data file after the merging then do any cleaning and validation.
c. After do all these, run Plots and Summary Statistics
Year
OilP
1980
35.52
1981
34
1982
32.38
1983
29.04
1984
28.2
1985
27.01
1986
13.53
1987
17.73
1988
14.24
1989
17.31
1990
22.26
1991
18.62
1992
18.44
1993
16.33
1994
15.53
1995
16.86
1996
20.29
1997
18.86
1998
12.28
1999
17.44
2000
27.6
2001
23.12
2002
24.36
2003
28.1
2004
36.05
2005
50.59
2006
61
2007
69.04
2008
94.1
2009
60.86
2010
77.38
2011
107.46
2012
109.45
2013
105.87
2014
96.29
2015
49.49
Year
Food exports (% of merchandise exports)
Ores and metals exports (% of merchandise exports)
1980
0.09638294
0.060083757
1981
0.094079554
0.024360528
1982
0.128489839
0.025668368
1983
..
..
1984
..
..
1985
0.259787311
0.116943755
1986
..
..
1987
..
..
1988
1.371078529
0.732151804
1989
1.374888969
0.834330299
1990
0.713126234
0.491007478
1991
0.526384845
0.242750346
1992
1.074388363
0.548851562
1993
0.982275388
0.429968062
1994
0.673955645
0.346686956
1995
0.810242733
0.567217625
1996
0.632336949
0.304958406
1997
..
..
1998
1.114818605
0.507089276
1999
0.930990348
0.262574488
2000
0.538501429
0.147164016
2001
0.558465111
0.201693533
2002
0.628539417
0.223275991
2003
0.835851768
0.182707717
2004
0.7405123
0.172800798
2005
0.620831971
0.137293785
2006
0.64203501
0.219532433
2007
0.838923226
0.283587719
2008
0.744029125
0.221986187
2009
1.407633083
0.232499732
2010
1.155876888
0.154654215
2011
0.898301922
0.122271232
2012
0.860627792
0.138455596
2013
0.878931429
0.403127249
2014
1.006265279
0.769034983
2015
1.798068624
1.307540253
Year
OilP
1980
35.52
1981
34
1982
32.38
1983
29.04
1984
28.2
1985
27.01
1986
13.53
1987
17.73
1988
14.24
1989
17.31
1990
22.26
1991
18.62
1992
18.44
1993
16.33
1994
15.53
1995
16.86
1996
20.29
1997
18.86
1998
12.28
1999
17.44
2000
27.6
2001
23.12
2002
24.36
2003
28.1
2004
36.05
2005
50.59
2006
61
2007
69.04
2008
94.1
2009
60.86
2010
77.38
2011
107.46
2012
109.45
2013
105.87
2014
96.29
2015
49.49
Explanation / Answer
The R code is given below:
a=read.table('C:/Users/SONY/Desktop/book1.CSV',sep=',',header=F);a
b=read.table('C:/Users/SONY/Desktop/book2.CSV',sep=',',header=F,stringsAsFactors=FALSE);b
b[,2]=as.vector(b[,2],mode='numeric')
b[,3]=as.vector(b[,3],mode='numeric')
c=merge(a,b,by='Year');c
plot(c) #pair plots of all the variables
pairs(c[-1]) #pair plots excluding the index variable ie. the Years
summary(c[-1]) #5 point summary of the variables
primarily save the two datasets in desktop and name it book1 and book2 resp. both in CSV format... then run this code you will get your result......
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.