Apply a Function Over a List and Obtain a List of Objects
Applies the function
FUN to each element of the list
and returns the result as a list of class
"anylist" as appropriate.
anylapply(X, FUN, ...)
solapply(X, FUN, ..., check = TRUE, promote = TRUE, demote = FALSE)
- A list.
- Function to be applied to each element of
- Additional arguments to
- Arguments passed to
solistwhich determine how to handle different classes of objects.
These convenience functions are similar to
except that they return a list of class
In both functions, the result is computed by
lapply(X, FUN, ...).
anylapply the result is converted to a list of class
"anylist" and returned.
solapply the result is converted to
a list of class
"solist" if possible, using
as.solist. If this is not possible,
then the behaviour depends on the argument
demote=TRUE the result will be returned as a
list of class
demote=FALSE (the default),
an error occurs.
- A list, usually of class