r_vanilla {callr} | R Documentation |
It tries to mimic a fresh R installation. In particular:
No library path setting.
No CRAN(-like) repository is set.
The system and user profiles are not run.
r_vanilla(func, args = list(), libpath = character(), repos = c(CRAN = "@CRAN@"), cmdargs = "--slave", system_profile = FALSE, user_profile = FALSE, env = character(), ...)
func |
Function object to call in the new R process.
The function should be self-contained and only refer to
other functions and use variables explicitly from other packages
using the r(.libPaths) does not work, because r(function() .libPaths()) works just fine. |
args |
Arguments to pass to the function. Must be a list. |
libpath |
The library path. |
repos |
The repos option. If |
cmdargs |
Command line arguments to pass to the R process.
Note that |
system_profile |
Whether to use the system profile file. |
user_profile |
Whether to use the user's profile file. |
env |
Environment variables to set for the child process. |
... |
Additional arguments are passed to |
Other callr functions: r_copycat
,
r
## Not run: # Compare to r() r(function() .libPaths()) r_vanilla(function() .libPaths()) r(function() getOption("repos")) r_vanilla(function() getOption("repos")) ## End(Not run)