0

Ive got a little question: I'm combining two data frames like this: test <- comp1[comp1$TOKEN %in% comp2$TOKEN,] which works well. The problem is that there is another column in comp2 (comp2$N) that i want to add to the new data frame test. How do i do this?

M.H.
  • 1

1 Answers1

2

Are you looking for an inner join on comp1 and comp2? Like this:

merge(comp1, comp2, by='TOKEN')
mr.bjerre
  • 2,384
  • 2
  • 24
  • 37