knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) options(future.globals.maxSize = Inf)
Tester
library(tester) library(future.apply) n <- 2 plan(multicore) t0 <- Sys.time() a <- lapply(1:n, time_foo) cat(sprintf("Time spend on code in seconds: %.2f\n", difftime(Sys.time(), t0, "secs"))) t0 <- Sys.time() a <- future_lapply(1:n, time_foo) cat(sprintf("Time spend on code in seconds: %.2f\n", difftime(Sys.time(), t0, "secs")))
internal_foo() plan(sequential) internal_foo()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.