powered by
Does the same thing as apply except that when the function returns a vector, the dimensions are put back the way they started.
apply
stable.apply(X, MARGIN, FUN, ...)
same as in apply.
When FUN returns a scalar or when MARGIN has a length that is not one less than the number of dimensions in X, then the same as apply.
FUN
MARGIN
X
Otherwise, an array similar to the result of apply, but with the dimensions permuted to correspond to the dimensions of X.
S Poetry, Patrick J. Burns, http://www.burns-stat.com/pages/spoetry.html
apply, aperm
aperm
# NOT RUN { data(freeny) stable.apply(freeny.x, 1, sort) # compare to: apply(freeny.x, 1, sort) # }
Run the code above in your browser using DataLab