on_start | R Documentation |
Internal function, that initializes plotdir, csvdir and logfilename.
on_start(plotdir, csvdir, logfilename, parallel)
plotdir |
A character string. Path to the folder, where plots are saved. |
csvdir |
A character string. Path to the folder, where resulting tables are saved. |
logfilename |
A character string. Path to the logfile to save the log messages. |
parallel |
A boolean. If TRUE (the default value), initializing 'future::plan("multicore")' (on unix systems) or 'future::plan("multisession")' (on non-unix systems) before running the code. |
This function silently creates the directories'plotdir' and 'csvdir' on the local filesystem and initializes the logfile, specified with 'logfilename'. Furthermore, if 'parallel = TRUE', the 'future'-backend is initialized.
plan
# runtime > 5 sec. plotdir <- paste0(tempdir(), "/plots/") csvdir <- paste0(tempdir(), "/csv/") logfilename <- paste0(tempdir(), "/log.txt") parallel <- FALSE on_start(plotdir, csvdir, logfilename, parallel)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.