Re: [R] average environmental data if AnimalID and Time is duplicated

2012-09-26 Thread Tagmarie
Thank you! Am 26.09.2012 13:31, schrieb Jim Lemon [via R]: > On 09/26/2012 08:53 PM, Tagmarie wrote: > > > Hello, > > I tried for about three hours now to solve this problem but I can't > figure > > it out. I am sure someone knows how do it. At least I hope so. > > > > I have a data frame somewha

Re: [R] average environmental data if AnimalID and Time is duplicated

2012-09-26 Thread arun
acter(Temp))})  myframe2[,list(meanHunger=mean(Hunger),meanTemp=mean(Temp)),list(ID,Timestamp)]  #     ID    Timestamp meanHunger meanTemp #1: Ernie 24.09.2012 09:00  3 27.5 #2:  Bert 24.09.2012 10:00  2 27.0 #3:  Bert 25.09.2012 10:00      2 28.0 A.K. - Or

Re: [R] average environmental data if AnimalID and Time is duplicated

2012-09-26 Thread Rui Barradas
Hello, Why do you have Hunger and Temp recorded as characters? Between double quotes? myframe <- data.frame (ID=c("Ernie", "Ernie", "Bert", "Bert"), Timestamp=c("24.09.2012 09:00", "24.09.2012 09:00", "24.09.2012 10:00", "25.09.2012 10:00"), Hunger=c("1","5","2","2"), Temp=c("25","30","27","2

Re: [R] average environmental data if AnimalID and Time is duplicated

2012-09-26 Thread Jim Lemon
On 09/26/2012 08:53 PM, Tagmarie wrote: Hello, I tried for about three hours now to solve this problem but I can't figure it out. I am sure someone knows how do it. At least I hope so. I have a data frame somewhat like this: myframe<- data.frame (ID=c("Ernie", "Ernie", "Bert", "Bert"), Timestam

[R] average environmental data if AnimalID and Time is duplicated

2012-09-26 Thread Tagmarie
Hello, I tried for about three hours now to solve this problem but I can't figure it out. I am sure someone knows how do it. At least I hope so. I have a data frame somewhat like this: myframe <- data.frame (ID=c("Ernie", "Ernie", "Bert", "Bert"), Timestamp=c("24.09.2012 09:00", "24.09.2012 09: