title: Compare value in the same column in R
body: <p>I want to compare the values in the same column in R.
  My data set is like :</p>
  <p>F1      F2      F3<br />
  C300100 M1001   abc<br />
  C300100 M1002   abc,def<br />
  C300100 M1003   abc,def,ghi<br />
  C300101 M1004   q<br />
  C300101 M1005   q,r<br />
  C300101 M1006   q,r,s<br />
  C300101 M1007   a,b,c,d<br />
  C30010111   C300101 abc<br />
  C30010111   C300101 def,khy<br />
  C30010199   cc  c23</p>
  <p>The expected output is :</p>
  <p>F1     F2    F3             F4
  C300100    M1001    abc        TRUE<br />
  C300100    M1002    abc,def    TRUE<br />
  C300100    M1003    abc,def,ghi TRUE<br />
  C300101     M1004   q           TRUE<br />
  C300101     M1005   q,r         TRUE<br />
  C300101     M1006   q,r,s       TRUE<br />
  C300101     M1007   a,b,c,d      FALSE<br />
  C30010111   M1008   abc         FALSE
  C30010111   C300101 def,khy     FALSE<br />
  C30010199   cc  c23             FALSE</p>
  <p>In the first case of F1= A  and F2 = 100, because F3=g is present in second record and third record so it is true.</p>
  <p>For the second record A    100  g,h   g and h is present in record 3 so it is true.</p>
  <p>I need to compare first record with second and third and so on,
  then second record with third and so on.
  If value is present is subsequent record then it is TRUE otherwise it is FALSE.</p>
  <p>is there a library and function which does this efficiently.</p>
  <p>Any help is highly appreciated.</p>
  <p>Regards,
  A</p>