Re your mention in your other mail (which didn't go to r-help) of this part
of the doc:
"The default value, TRUE, returns a vector or matrix if appropriate,
whereas if simplify = "array" the result may be an array of “rank”
(==length(dim(.))) **one higher than the result of FUN(X[[i]]).**"
It's
Jean-Claude:
Well, here's my "explanation". Caveat emptor!
Note that:
"simplify2array() is the utility called from sapply() when simplify is
not false"
and
> sapply(a, I, simplify = "array")
[,1] [,2]
[1,] list,2 list,2
[2,] list,2 list,2
So it seems that simplify2array() is not
Reading the doc for ?simplify2array, I got the impression that with the
'higher = T' argument the function returns an array of dimension greater
than 2 when it makes sense (the doc says "when appropriate", which is
rather vague). I would expect
a <- list(
list(list(1, 2), list(3, 4)),
3 matches
Mail list logo