match two data.frame

Posted by Elb on Stack Overflow See other posts from Stack Overflow or by Elb
Published on 2012-10-03T20:09:39Z Indexed on 2012/10/04 3:37 UTC
Read the original article Hit count: 73

Filed under:

I have a situation like this:

DF1

  COL1   COL2   COL3  ...   

   a      b      c       
   b      d      b
   f      e      a
   g      m      f      

DF2

COL
a
b
c
d
e
f
g
h
i
l
m
n
o

I would like to match each column of DF1 with the only one column of DF2 and score how many occurrence of DF2 are in each column of DF1. How this can be done?

Thanks in advance,

E.

© Stack Overflow or respective owner

Related posts about r