replicate <- function (n, expr, simplify = TRUE)
sapply(integer(n),
eval.parent(
substitute(function(...) expr)),
simplify = simplify)
The replicate function uses R's compute-on-the-language to construct a new function that has expr as its body.A closure's argument will be evaluated at most once.
No comments yet.