## i didn't try this, but I would think it would work newAB <-data.frame(AB$id, AB$age, AB$sex, AB$area) colnames(newAB)<-c("id","age", "sex, "area") uni.newAB <- unique(newAB) t3<-merge(t2, uni.newAB, by="id", all=FALSE) -- View this message in context: http://r.789695.n4.nabble.com/Need-help-merging-two-dataframes-tp3297313p3301627.html Sent from the R help mailing list archive at Nabble.com.
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.