Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

NOTE THAT ((This should be done by R studio !)) Please a. Merge the two data fil

ID: 3844626 • Letter: N

Question

NOTE THAT

((This should be done by 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

Here we are using two data files. Whenever we want to merge two data files there must be one more common columns must be there in both the data sets by which we can merge.

In R-studio,we use merge() function to merge two students based on a common key.

Merged.file <- merge(datafile1,datafile2,by="Year")

Here the MergedFile is the function name which is stored as the R object.

b)since,the data in years 83,84,86,87,97 doesn't exist ,we can clean that data.

c)To plot the above in graph view,we use the following function

Plot(x,y,main,x lab,ylab,xlimit,ylimit,axes)

Where x- which column you want to plot on x coordinate

y- which column you want to plot on y coordinate

main is the graph title

xlab is label of horizontal axis

xlab is label of vertical axis

xlimit is limit of values on horizontal axis

ylimit is limit of values on vertical axis

I want to plot year on x- axis and food exports on y axis

Which implies,plot(year,food exports,Food exports summary,Year,Food exports,2015,1.407633083)