I used any of the following codes to merge two of my data frames:
join(j5, c4, inner")
merge(j5, c4, left_on='year', how='inner')
The resultant data frame being:
year tradevaluejapan tradevaluechina
1 1992 1215216 265860
2 1993 654958 300987
3 1994 1058199 693368
4 1995 4827964 1608935
5 1996 2882890 1457594
6 1997 5859965 880888
7 1998 3499868 859137
8 1999 3530975 1069889
9 2000 439580 2026727
10 2001 9808706 2675847
11 2002 9358647 4568524
12 2003 1348892 4608139
13 2004 945569 6619693
14 2005 738876 14812109
15 2006 1453525 17870811
16 2007 9335089 19904723
17 2008 5391225 26881686
18 2009 55391 18815007
19 2010 1246401 20065842
20 2011 25783 19004412
21 2012 88171 17278793
22 2013 329110 19116949
23 2014 1066022 32076571
Separately, I learnt how to plot a multiple time series using the codes from the following link: Plot multiples (time) series in R with legend
But how can I plot my resultant merged data frame as a multiple time series?