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
gmarie To: r-help@r-project.org Cc: Sent: Tuesday, September 25, 2012 10:44 AM Subject: [R] add a data frame to my data frame Hello, Once again I feel so dumb. Can anyone help me? I have a data frame somewhat like that: myframe <- data.frame (ID=c("Ernie", "Ernie&qu

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

[R] add a data frame to my data frame

2012-09-25 Thread Tagmarie
Hello, Once again I feel so dumb. Can anyone help me? I have a data frame somewhat like that: myframe <- data.frame (ID=c("Ernie", "Ernie", "Bert", "Bert"), Timestamp=c("24.09.2012 09:00", "25.09.2012 09:00", "24.09.2012 10:00", "25.09.2012 10:00"), Hunger=c("1","1","2","2") ) myframestime <- a