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