Thank you very much, I didn't know that.
On 08/06/2015 6:04 AM, Christian Brandstätter wrote:
Thank you for the explanation.
But if you take for instance plot.default(), being another generic
function, it would not work like that:
plot(1,2,3,4), only plot(1,2) is accepted.
From R-help (Usag
On 08/06/2015 6:04 AM, Christian Brandstätter wrote:
> Thank you for the explanation.
> But if you take for instance plot.default(), being another generic
> function, it would not work like that:
> plot(1,2,3,4), only plot(1,2) is accepted.
>
>
> From R-help (Usage):
> ## Default S3 method:
> m
Thank you for the explanation.
But if you take for instance plot.default(), being another generic
function, it would not work like that:
plot(1,2,3,4), only plot(1,2) is accepted.
From R-help (Usage):
## Default S3 method:
mean(x, trim = 0, na.rm = FALSE, ...)
What is puzzling, is that apparen
On Mon, 8 Jun 2015, Christian Brandstätter wrote:
Dear list,
I found an odd behavior of the mean function; it is allowed to do something
that you probably shouldn't:
If you calculate mean() of a sequence of numbers (without declaring them as
vector), mean() then just computes mean() of the fi
Hi,
Try either:
res1 <- apply(mydata[,1:2],2,mean)
res2 <- colMeans(mydata[,1:2])
identical(res1,res2)
#[1] TRUE
# Also if you need to find means for each group ("Ungrazed vs. "Grazed")
by(mydata[,-3],mydata[,3],colMeans)
#or if column names are "V1", "V2", "V3"
aggregate(.~V3,mydata,mean)
#or
5 matches
Mail list logo