## 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
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.
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
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
4 matches
Mail list logo