Re: [R] Need help merging two dataframes

2011-02-11 Thread B77S
## 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-he

Re: [R] Need help merging two dataframes

2011-02-10 Thread Nathaniel
Hi Dennis, Thanks for the solution, I really appreciate it! Best, Nathaniel -- View this message in context: http://r.789695.n4.nabble.com/Need-help-merging-two-dataframes-tp3297313p3299539.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Need help merging two dataframes

2011-02-09 Thread Dennis Murphy
Hi: Here's one approach to the problem you posed (don't know if it is what you want for the problem you intend you use it on...) df1 <- read.table(textConnection(" id sexage area 01 male adult LP 01 male adult LP 01 male

[R] Need help merging two dataframes

2011-02-09 Thread Nathaniel
Hi R users, I am trying to extract some attributes (age, sex, area) from dataframe "AB" that has 101,269 observations of 28 variables to dataframe "t2" that has 47 observations of 6 variables. They share a column called "id", which is a factor with 47 levels. I want to end up with a dataframe t