What is the difference of using 2L versus 2 as the margin argument in the
apply() function? Where can I find detailed information on all of the
possible margin arguments?

> x
     [,1] [,2]
[1,]    1    2
[2,]    3    4
[3,]    5    6
[4,]    7    8
[5,]    9   10
> sqrt(apply(x, *2L*, function(r.st) var(r.st[!is.na(r.st)])))
[1] 3.162278 3.162278
> sqrt(apply(x,* 2*, function(r.st) var(r.st[!is.na(r.st)])))
[1] 3.162278 3.162278

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to