lsapply
Arguments
- X
a vector (atomic or list) or an
expression
object. Other objects (including classed objects) will be coerced bybase::as.list
.- FUN
the function to be applied to each element of
X
: see ‘Details’. In the case of functions like+
,%*%
, the function name must be backquoted or quoted.- ...
optional arguments to
FUN
.- outnames
Character vector: Optional names to apply to output
- simplify
logical or character string; should the result be simplified to a vector, matrix or higher dimensional array if possible? For
sapply
it must be named and not abbreviated. The default value,TRUE
, returns a vector or matrix if appropriate, whereas ifsimplify = "array"
the result may be anarray
of “rank” (\(=\)length(dim(.))
) one higher than the result ofFUN(X[[i]])
.