Re: [R] apply() function: margin argument: "2L" versus "2"

2012-06-22 Thread Luba G
in=4; > apply(x, 1:2, fun) or apply(x, c(1, 3), fun) or ... > apply(x, 1:3, fun) > > Hope this helps, > > Rui Barradas > > Em 22-06-2012 23:23, Luba G escreveu: > >> What is the difference of using 2L versus 2 as the margin argument in the >> apply() functi

[R] apply() function: margin argument: "2L" versus "2"

2012-06-22 Thread Luba G
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,]12 [2,]34 [3,]56 [4,]78 [5,]9 10 > sqrt(apply(x, *2L*, function(r.