powered by
Memoizing wrapper for lapply.
lapplym(X, FUN, ...)
list of results.
list or vector of inputs
function to apply
additional arguments passed to lapply
VectorizeM, vapplym, parLapplyLBm
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)
Run the code above in your browser using DataLab