Re: [R] Match 2 vectors

2010-05-28 Thread Kang Min
That's what I wanted, thanks!! On May 28, 5:13 pm, Dennis Murphy wrote: > Hi: > > On Thu, May 27, 2010 at 10:26 PM, Kang Min wrote: > > Hi, > > > I have 2 dataframes of unequal length, and I would like to match a > > factor to them so that both dataframes will have the same number of > > rows.

Re: [R] Match 2 vectors

2010-05-28 Thread Dennis Murphy
Hi: On Thu, May 27, 2010 at 10:26 PM, Kang Min wrote: > Hi, > > I have 2 dataframes of unequal length, and I would like to match a > factor to them so that both dataframes will have the same number of > rows. > > example: > # create the 2 dataframes with unequal length > data1 <- data.frame(lett

[R] Match 2 vectors

2010-05-27 Thread Kang Min
Hi, I have 2 dataframes of unequal length, and I would like to match a factor to them so that both dataframes will have the same number of rows. example: # create the 2 dataframes with unequal length data1 <- data.frame(letters, 1:26)[-c(5,10,19:21),] data2 <- data.frame(letters, 1:26)[-c(6,9,15: