lapply
returns a list of the same length as X
, each
element of which is the result of applying FUN
to the
corresponding element of X
. sapply
is a user-friendly version and wrapper of lapply
by default returning a vector, matrix or, if simplify="array"
,
an array if appropriate, by applying simplify2array()
.
sapply(x, f, simplify=FALSE, USE.NAMES=FALSE)
is the same
as lapply(x, f)
.
NOTE: This man page is for the lapply
and sapply
S4 generic functions defined in the BiocGenerics package.
See ?base::lapply
for the default methods
(defined in the base package).
Bioconductor packages can define specific methods for objects
(typically list-like or vector-like) not supported by the
default methods.