Create options for an r_process object

r_process_options(...)

Arguments

...

Options to override, named arguments.

Value

A list of options.

r_process_options() creates a set of options to initialize a new object from the r_process class. Its arguments must be named, the names are used as option names. The options correspond to (some of) the arguments of the r() function. At least the func option must be specified, this is the R function to run in the background.

Examples

## List all options and their default values: r_process_options()
#> $func #> NULL #> #> $args #> list() #> #> $libpath #> [1] "/Users/gaborcsardi/works/callr/r-packages" #> [2] "/Users/gaborcsardi/R" #> [3] "/Library/Frameworks/R.framework/Versions/3.6/Resources/library" #> #> $repos #> CRAN #> "https://cloud.r-project.org" #> #> $stdout #> [1] "|" #> #> $stderr #> [1] "|" #> #> $poll_connection #> [1] TRUE #> #> $error #> [1] "error" #> #> $cmdargs #> [1] "--slave" "--no-save" "--no-restore" #> #> $system_profile #> [1] FALSE #> #> $user_profile #> [1] FALSE #> #> $env #> character(0) #> #> $supervise #> [1] FALSE #> #> $load_hook #> [1] "{\n" #> [2] " while (\"tools:callr\" %in% search()) detach(\"tools:callr\")\n" #> [3] " env <- readRDS(\"/var/folders/59/0gkmw1yj2w7bf2dfc3jznv5w0000gn/T//RtmpnpdbWv/file146bb445c8cfd\")\n" #> [4] " do.call(\"attach\", list(env, pos = length(search()), name = \"tools:callr\"))\n" #> [5] " data <- env$`__callr_data__`\n" #> [6] " data$pxlib <- data$load_client_lib(data$sofile)\n" #> [7] " options(error = function() invokeRestart(\"abort\"))\n" #> [8] " rm(list = c(\"data\", \"env\"))\n" #> [9] "}\n" #> #> $extra #> list() #>