0

I'm a new R user and I'm trying to merge two dataset on the basis of a common field. The problem is that the lenght of this field is different in the two dataset, as displayed in this exemplifying table:

Table1:

    CODE  area
    1     23
    2     56
    3     35
    4     66
    5     22
    6     24

Table 2:

    CODE  population
    1     467
    2     234
    4     436
    6     287

as you can see, in table 2 just some of the numbers of the common field are the same of table 1. What I'm trying to do is to add in table 1 the population data where the "CODE" field matches, while adding a blank space or a nodata where this information is missing.

okapina
  • 3
  • 1

0 Answers0