Re: [R] Mean of colMeans

2014-05-22 Thread arun
ment. > Please refer to www.vestas.com/legal/notice > If you have received this e-mail in error please contact the sender. > > >> -Original Message- >> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] >> On Behalf Of Sarah Goslee >

Re: [R] Mean of colMeans

2014-05-21 Thread Boris Steipe
. > > >> -Original Message- >> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] >> On Behalf Of Sarah Goslee >> Sent: 21. maj 2014 21:11 >> To: Kate Ignatius; r-help >> Subject: Re: [R] Mean of colMeans >> >&g

Re: [R] Mean of colMeans

2014-05-21 Thread Igor Sosa Mayor
Kate Ignatius writes: > Hi All, > > I've successfully gotten out the colMeans for 60 columns using: > > col <- colMeans(x, na.rm = TRUE, dims = 1) > > My next question is: is there a way of getting a mean of all the > column means (ie a mean of a mean)? maybe mean(x) ? -- :: Igor Sosa Mayor

Re: [R] Mean of colMeans

2014-05-21 Thread Frede Aakmann Tøgersen
to:r-help-boun...@r-project.org] > On Behalf Of Sarah Goslee > Sent: 21. maj 2014 21:11 > To: Kate Ignatius; r-help > Subject: Re: [R] Mean of colMeans > > That would be because col is a function in base R, and thus a poor > choice of names for user objects. Nonetheless, it wor

Re: [R] Mean of colMeans

2014-05-21 Thread Kate Ignatius
Thanks for the explanation. And tip... this was a quick a dirty code so didn't really think about naming something that is already a function in R. Data was generic - just a bunch of columns with numbers so didn't bother including that as I know that wasn't the problem. Same goes with replying -

Re: [R] Mean of colMeans

2014-05-21 Thread Sarah Goslee
That would be because col is a function in base R, and thus a poor choice of names for user objects. Nonetheless, it worked when I ran it, but you didn't provide reproducible example so who knows. R> set.seed(1) R> x <- data.frame(matrix(runif(150), ncol=10)) R> # col is a function, so not a good

[R] Mean of colMeans

2014-05-21 Thread Kate Ignatius
Hi All, I've successfully gotten out the colMeans for 60 columns using: col <- colMeans(x, na.rm = TRUE, dims = 1) My next question is: is there a way of getting a mean of all the column means (ie a mean of a mean)? Thanks! __ R-help@r-project.org ma