clapply {surveillance} | R Documentation |
Conditional lapply
Description
Use lapply
if the input is a list and otherwise apply the
function directly to the input and wrap the result in a list.
The function is implemented as
if (is.list(X)) lapply(X, FUN, ...) else list(FUN(X, ...))
Usage
clapply(X, FUN, ...)
Arguments
X |
a list or a single |
FUN |
the function to be applied to (each element of) |
... |
optional arguments to |
Value
a list (of length 1 if X
is not a list).
[Package surveillance version 1.23.0 Index]