Re: [Rd] apply() returning a list?

2011-07-21 Thread David A. Johnston
I understand that the coercion to a list is somewhat trivial. The coercion is a little less obvious when apply()'s output is a matrix. For example, > x = matrix(1:12, 3, 4) > apply(x, 1, range) [,1] [,2] [,3] [1,]123 [2,] 10 11 12 > structure(as.list(as.data.frame(apply(

[Rd] apply() returning a list?

2011-07-20 Thread David A. Johnston
Hi devel list, I searched for past posts about this issue and found none, so my apologies if this has been addressed before. The sapply() function has an argument 'simplify', and the mapply() function has an argument 'SIMPLIFY'. I am surprised that the apply() argument does not have a similar