# Evaluate a future using the 'multisession' plan
with(plan(multisession, workers = 2), {
f <- future(Sys.getpid())
w_pid <- value(f)
})
print(c(main = Sys.getpid(), worker = w_pid))
# Evaluate a future locally using the 'multisession' plan
local({
with(plan(multisession, workers = 2), local = TRUE)
f <- future(Sys.getpid())
w_pid <- value(f)
print(c(main = Sys.getpid(), worker = w_pid))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.