Re: [R] Error in colMeans with multiple column data.frame

2013-05-15 Thread arun
1, mean)  identical(res2,res3) #[1] TRUE A.K. - Original Message - From: Simonas Kecorius To: r-help@r-project.org Cc: Sent: Wednesday, May 15, 2013 5:46 AM Subject: [R] Error in colMeans with multiple column data.frame Dear R users, Here is my data: "a1"    "a2"    &quo

Re: [R] Error in colMeans with multiple column data.frame

2013-05-15 Thread Simonas Kecorius
Thank you for your help. Appreciate it a lot! I am using appropriate names, just here as an example I used data :) 2013/5/15 Rui Barradas > Hello, > > Try the following. > > aggregate(. ~ interval, data = data, mean) > > > Also, 'data' is an R function, you should use some other name, such a

Re: [R] Error in colMeans with multiple column data.frame

2013-05-15 Thread Rui Barradas
Hello, Try the following. aggregate(. ~ interval, data = data, mean) Also, 'data' is an R function, you should use some other name, such as 'dat'. Hope this helps, Rui Barradas Em 15-05-2013 10:46, Simonas Kecorius escreveu: Dear R users, Here is my data: "a1""a2""a3""a4"

Re: [R] Error in colMeans with multiple column data.frame

2013-05-15 Thread Simonas Kecorius
Thank you so much, it did what I need! 2013/5/15 Pascal Oettli > Hi, > > I renamed your data.frame "df", as "data" is a built-in function. > > You can achieve what you are looking for with: > > > datf.mean <- with(datf, aggregate(datf[,-6], list(interval=interval), > mean)) > > Advice: > Next t

Re: [R] Error in colMeans with multiple column data.frame

2013-05-15 Thread Blaser Nello
imonas Kecorius Sent: Mittwoch, 15. Mai 2013 11:46 To: r-help@r-project.org Subject: [R] Error in colMeans with multiple column data.frame Dear R users, Here is my data: "a1""a2""a3""a4""a5""interval" 432355159

Re: [R] Error in colMeans with multiple column data.frame

2013-05-15 Thread Pascal Oettli
Hi, I renamed your data.frame "df", as "data" is a built-in function. You can achieve what you are looking for with: > datf.mean <- with(datf, aggregate(datf[,-6], list(interval=interval), mean)) Advice: Next time, use "dput" when you submit a data set to R-help. Hope this helps, Pascal

[R] Error in colMeans with multiple column data.frame

2013-05-15 Thread Simonas Kecorius
Dear R users, Here is my data: "a1""a2""a3""a4""a5""interval" 432355159930499491 01841579182101201 1295208861104101 0100572910298361 017095842190441 017028963926