Skip to content
Prev 300870 / 398502 Next

R Beginner : Loop and adding row to dataframe

Hi Phil,

I think you want:

merge(listA, listB, by = "NACE")

which will give you:
   NACE Name aaa bbb ccc
1    1    a   a   a   c
2    1    a   a   a   c
3    1    a   a   a   c
4    2    b   a   a   c
5    2    b   a   a   c
6    3    c   a   a   c

If you want to get rid of the Name column, the following should help:
NACE aaa bbb ccc
1    1   a   a   c
2    1   a   a   c
3    1   a   a   c
4    2   a   a   c
5    2   a   a   c
6    3   a   a   c

Cheers,
Henrik


Am 22.07.2012 18:35, schrieb ph!l: