title: Create a variable in R dataframe recoding a variable using an external table?
body: <p>I have a dataframe with a numeric code for the city. There is a standard table for conversion from code to city name. I created another dataframe with these codes. How to create a new variable in the first dataframe containing the name of the city by comparing the numeric codes in the two different data frames?</p>
  <p>Example:</p>
  <p>DF1 is a dataframe and contains the variable IBGE.
  DF2 is another dataframe and contains the variable IBGE (same and different values from DF1) and the variable IDH. My intention is to have a new variable IDH in DF1. For example, if IDH is 0.871 for a given IBGE in DF2, the new variable in DF1 will have the same value.</p>