title: Tidydata - combining two dataset from different years - R to make a tidy data set
body: <p>I have been reading Hadley Wickam's work on tidy data sets, and following his idea, I am trying to create a tidy dataset. </p>
  
  <p>I currently have two datasets that contain the same variables for different years. I would like to merge the datasets, so that I have one dataframe, and the data for each year is on different lines.</p>
  
  <p>e.g. </p>
  
  <p>I have </p>
  
  <pre><code>Country .... Year .... GDP
  Albania .... 2000 .... X1
  Brazil  .... 2000 .... X3
  China   .... 2000 .... X5
  
  Country .... Year .... GDP
  Albania .... 2010 .... X2
  Brazil  .... 2010 .... X4
  China   .... 2010 .... X6
  </code></pre>
  
  <p>And I would like to get </p>
  
  <pre><code>Country .... Year .... GDP
  Albania .... 2000 .... X1
  Albania .... 2010 .... X2
  Brazil  .... 2000 .... X3
  Brazil  .... 2010 .... X4
  China   .... 2000 .... X5
  China   .... 2010 .... X6
  </code></pre>
  
  <p>I run the following code </p>
  
  <pre><code>test1 &lt;- full_join(df1, df2, by = "country")
  </code></pre>
  
  <p>However, I end up with new variables called GDP.x and GDP.y. </p>
  
  <p>Could someone help me solve this please? </p>