Re: [R] match a complete data.frame

2013-02-12 Thread David Winsemius
On Feb 12, 2013, at 5:10 AM, Mat wrote: > hello togehter, > > how can i match a complete data.frame to another one? > > I know i can match one column with that code: > > A<-match(data$PJ_ID,project$PROJ_ID) > data$Name<-proj$Name[A] How about: data <- data[ match(data$PJ_ID,project$PROJ_ID)

[R] match a complete data.frame

2013-02-12 Thread Mat
hello togehter, how can i match a complete data.frame to another one? I know i can match one column with that code: A<-match(data$PJ_ID,project$PROJ_ID) data$Name<-proj$Name[A] but how can i match the total data.frame from project to data? indivduel matching for each column is not very producti

Re: [R] match a complete data.frame

2013-02-12 Thread Mat
i found a way :-) data<-merge(data,project,by.x="PJ_ID",by.y="PROJ_ID",all.x=TRUE) perhaps this can help someone Mat -- View this message in context: http://r.789695.n4.nabble.com/match-a-complete-data-frame-tp4658250p4658252.html Sent from the R help mailing list archive at Nabble.com. ___