Re: [R] columns mapping

2010-07-28 Thread jd6688
Thank you so much. it worked as expected. you have been great help -- View this message in context: http://r.789695.n4.nabble.com/columns-mapping-tp2305213p2305401.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org m

Re: [R] columns mapping

2010-07-28 Thread Wu Gong
Hi, please try ?merge DF2$mappedColumn <- DF2$name merge(DF1,DF2,all.x=T,sort=F) - A R learner. -- View this message in context: http://r.789695.n4.nabble.com/columns-mapping-tp2305213p2305250.html Sent from the R help mailing list archive at Nabble.com. __

[R] columns mapping

2010-07-28 Thread jd6688
DF1 name OTHER ABC O KKK O QQQ O DDD O PPP O DF2 name ABC KKK DDD If the names in df1 resides in df2, then add the mapped name to df1 as a separate column, for instance "mappedColumn" the output should be: DF1 name OTHER mappedColumn ABCOABC KKKO KKK QQQ