Create options for an r_session object
Value
Named list of options.
The current options are:
libpath
: Library path for the subprocess. By default the same as the current library path. I.e. not necessarily the library path of a fresh R session.)repos
:repos
option for the subprocess. By default the current value of the main process.stdout
: Standard output of the sub-process. This can beNULL
or a pipe:"|"
. If it is a pipe then the output of the subprocess is not included in the responses, but you need to poll and read it manually. This is for experts. Note that this option is not used for the startup phase that currently always runs withstdout = "|"
.stderr
: Similar tostdout
, but for the standard error. Likestdout
, it is not used for the startup phase, which runs withstderr = "|"
.error
: See 'Error handling' inr()
.cmdargs
: See the same argument ofr()
. (Its default might be different, though.)system_profile
: See the same argument ofr()
.user_profile
: See the same argument ofr()
.env
: See the same argument ofr()
.load_hook
:NULL
, or code (quoted) to run in the sub-process at start up. (I.e. not for every singlerun()
call.)extra
: List of extra arguments to pass to processx::process.
Call r_session_options()
to see the default values.
r_session_options()
might contain undocumented entries, you cannot
change these.
Examples
r_session_options()
#> $func
#> NULL
#>
#> $args
#> NULL
#>
#> $libpath
#> [1] "/home/runner/work/_temp/Library" "/opt/R/4.3.3/lib/R/site-library"
#> [3] "/opt/R/4.3.3/lib/R/library"
#>
#> $repos
#> RSPM
#> "https://packagemanager.posit.co/cran/__linux__/jammy/latest"
#> CRAN
#> "https://cran.rstudio.com"
#>
#> $stdout
#> NULL
#>
#> $stderr
#> NULL
#>
#> $error
#> [1] "error"
#>
#> $cmdargs
#> [1] "--no-readline" "--slave" "--no-save" "--no-restore"
#>
#> $system_profile
#> [1] FALSE
#>
#> $user_profile
#> [1] "project"
#>
#> $env
#> TERM
#> "dumb"
#>
#> $supervise
#> [1] FALSE
#>
#> $load_hook
#> NULL
#>
#> $extra
#> list()
#>
#> $arch
#> [1] "same"
#>