[R] match a complete data.frame

David Winsemius dwinsemius at comcast.net
Tue Feb 12 19:26:12 CET 2013


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) , ]

(Untested in the absence of data ... or 'data'.




> but how can i match the total data.frame from project to data?
> indivduel matching for each column is not very productive....
> 
-- 

David Winsemius
Alameda, CA, USA



More information about the R-help mailing list