View source: R/opt-memory-alloc.R
opt_memory_alloc | R Documentation |
Performs one memory allocation pass. Carefully examine the results after running this function!
opt_memory_alloc(code)
code |
A list of character vectors with the code to optimize. |
code <- paste(
"v <- NULL",
"for (i in 1:5) {",
" v[i] <- i^2",
"}",
sep = "\n"
)
cat(opt_memory_alloc(list(code))$codes[[1]])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.