callr (version 1.0.0)

rcmd_safe: Call R CMD <command> safely

Description

Very similar to rcmd, but with different defaults, that tend to create a less error-prone execution environment for the child process.

Usage

rcmd_safe(cmd, cmdargs = character(), libpath = .libPaths(),
  repos = c(getOption("repos"), c(CRAN = "https://cran.rstudio.com")),
  system_profile = FALSE, user_profile = FALSE, env = c(CYGWIN =
  "nodosfilewarning", R_TESTS = "", R_BROWSER = "false", R_PDFVIEWER = "false"),
  ...)

Arguments

cmd

Command to run. See R --help from the command line for the various commands. In the current version of R (3.2.4) these are: BATCH, COMPILE, SHLIB, INSTALL, REMOVE, build, check, LINK, Rprof, Rdconv, Rd2pdf, Rd2txt, Stangle, Sweave, Rdiff, config, javareconf, rtags.

cmdargs

Command line arguments.

libpath

The library path.

repos

The ‘repos’ option. If NULL, then no repos option is set. This options is only used if user_profile or system_profile is set to FALSE, as it is set using the system or the user profile.

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 rcmd.

See Also

Other R CMD commands: rcmd