Re: [R] add a data frame to my data frame

2012-09-26 Thread Tagmarie
Thanks to all of you. The three advices helped me a lot - solved my problem and thank you Sarah for the hint with rseek.org. Didn't know that one. Have a great day, Tagmarie -- View this message in context: http://r.789695.n4.nabble.com/add-a-data-frame-to-my-data-frame-tp4644122p4644206.htm

Re: [R] add a data frame to my data frame

2012-09-25 Thread arun
HI, I guess this is what you are looking for: merge(myframe2,environ2, by="ID") # ID Hunger    myframestime Temp Rain  envirotime #1  Bert  2 2012-09-24 10:00:00   27    2 2012-09-25 10:00:00 #2  Bert  2 2012-09-25 10:00:00   27    2 2012-09-25 10:00:00 #3 Ernie  1 2012-

Re: [R] add a data frame to my data frame

2012-09-25 Thread Sarah Goslee
How about: > merge(myframe2, environ2, all.x=TRUE, by.x=c("ID", "myframestime"), > by.y=c("ID", "envirotime")) IDmyframestime Hunger Temp Rain 1 Bert 2012-09-24 10:00:00 2 2 Bert 2012-09-25 10:00:00 2 272 3 Ernie 2012-09-24 09:00:00 1 25 0.1 4 Ernie 2012-0

Re: [R] add a data frame to my data frame

2012-09-25 Thread jim holtman
Is this what you want: > myframe2 ID Hungermyframestime 1 Ernie 1 2012-09-24 09:00:00 2 Ernie 1 2012-09-25 09:00:00 3 Bert 2 2012-09-24 10:00:00 4 Bert 2 2012-09-25 10:00:00 > environ2 ID Temp Rain envirotime 1 Ernie 25 0.1 2012-09-24 09:00:00 2