I have a problem with the merge command.
I have to merge two dataframe that looks like the following example:

CODPROD       N1           N3           N4
23                       3               55                 4
24                       5              67                36
25                      3               73                 24



second data frame


CODPROD                  N1              N2       
30                                   34               45
45                                   0                    78
65                                    0                    56


The result should be:

CODPROD                 N1       N2         N3            N4
23                                 3           NA        55            4
24                                 5           NA        67           36
25                                 3           NA        73           24
30                                 34         45          NA           NA
45                                  0          78          NA           NA    
65                                  0           56          NA            NA

Anyone knows how to do it??

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to