title: R: Linking values from datasets and filling in corresponding values
body: <p>I have a large dataframe with information about the gender of individuals. I have a second dataframe with observations about these individuals and I want to fill in the corresponding gender for each individual.</p>
  
  <pre><code>a &lt;- data.frame(Individual = c(1,2,3,4,5,6,7,8), 
              Gender = c("M","M","F","F","M","F","M","M"))
  
  b &lt;- data.frame(Individual = c(2, 1, 5, 2, 8, 8, 3, 3, 4, 4, 4, 5, 6, 1, 7),
              Gender = c(NA))
  </code></pre>
  
  <p>What R code can I use to bring information about the gender of Individual from data.frame a and fill it into the Gender column of data.frame b, given the order and the length of the two data.frames are different?</p>