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