lapplym | R Documentation |
Memoizing wrapper for lapply.
lapplym(X, FUN, ...)
X |
list or vector of inputs |
FUN |
function to apply |
... |
additional arguments passed to lapply |
list of results.
VectorizeM
, vapplym
, parLapplyLBm
fs <- function(x) { x <- x[[1]]; print(paste("see", x)); sin(x) }
# should only print "see" twice, not 6 times
lapplym(c(0, 1, 1, 0, 0, 1), fs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.