[R] finding missing lines...

2005-10-07 Thread Vittorio
Take this as an example: a=data.frame(col1=c(1,2,3,4,5), col2=c (my,beloved,daughter,son,wife)) b=data.frame(col1=c(1,2,4), col2=c(my,beloved,son)) a col1 col2 11 my 2 2 beloved 33 daughter 44 son 55 wife b col1col2 11 my 22

Re: [R] finding missing lines...

2005-10-07 Thread Dimitris Rizopoulos
10:02 AM Subject: [R] finding missing lines... Take this as an example: a=data.frame(col1=c(1,2,3,4,5), col2=c (my,beloved,daughter,son,wife)) b=data.frame(col1=c(1,2,4), col2=c(my,beloved,son)) a col1 col2 11 my 2 2 beloved 33 daughter 44 son 55

Re: [R] finding missing lines...

2005-10-07 Thread Florence Combes
Vittorio, you can also code sthing like this: ind-(setdiff(b,a))$col1 you have what is common in a and b, and then you take the opposite in a : a[-ind,] col1 col2 3 3 daughter 5 5 wife hope this helps, florence. On 10/7/05, Vittorio [EMAIL PROTECTED] wrote: Take this as an example: