Re: [R] Comparing data frames

2010-04-19 Thread Laura Ferrero-Miliani
Thank you all for your help and suggestions. L On Sun, Apr 18, 2010 at 8:51 PM, Tal Galili wrote: > Would: > ?merge > Work for you ? > > > Contact > Details:--- > Contact me: tal.gal...@gmail.com |  972-52-7275845 > Read me: www

Re: [R] Comparing data frames

2010-04-18 Thread Tal Galili
Would: ?merge Work for you ? Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) ---

[R] Comparing data frames

2010-04-18 Thread Laura Ferrero-Miliani
Dear very helpful friends, It is Sunday, there is no air traffic in Europe, what better to do than try and learn me some more R. I have the following example: owner <- c(1:4) animal <- c("cat", "dog", "cat", "dog") char.1 <- c("fluffy", "playful", "mean", "stupid") food <- c("cat food", "left-ove

Re: [R] Comparing data frames and keeping non-matches

2009-03-11 Thread Pele
Hi All, I found a solution that give the correct answer.. year <- c(2100:2110) x1 <- c(F,T,T,F,F,F,T,F,T,T,F) df1 <- data.frame(cbind(year, x1)) df1$subject <- c(1,1,1,2,2,3,3,3,3,4,4) df1$match <- 1 df1$key <- paste(df1$subject, df1$match, sep="") ; df1 df2 <- data.frame(cbind(year, x1)) df2$

[R] Comparing data frames and keeping non-matches

2009-03-11 Thread Pele
Hi R users, I am trying to compare 2 data frames by subject and match and save the no matches to an object called nomatch, but I am getting unexpected results... Can anyone tell me how to correct the code to get the expected results shown in the last table? Many thanks in advance for your any h