Re: [R] problem with recording numeric output into another dataframe

2009-08-07 Thread Rnewbie
Thank you very much for the reply. The thing I want to achieve in the end is to use dataframe1 as a master dataframe, and get values from multiple dataframes to dataframe1, so that I can analyze the data altogether, like this: IDvalue1 value2 value3 a 100 123 456

Re: [R] problem with recording numeric output into another dataframe

2009-08-06 Thread Henrique Dallazuanna
Try this: g <- sapply(DF1$ID, grep, x = DF2$ID) transform(DF2[unlist(g),],ID = DF1$ID[which(g > 0)]) On Thu, Aug 6, 2009 at 1:41 PM, Rnewbie wrote: > > dear all, > > I have two dataframes > > dataframe1 > ID > a > b > c > > dataframe2 > ID value > a;W 100 > X;c 200 > Y;Z 300