Learn R Programming

covr (version 1.2.0)

subprocess: Run R commands in a R subprocess

Description

this function runs a R subprocess then given code, trying to replicate as much of the calling environment as possible, then returning the results to the calling environment.

Usage

subprocess(code, calling_env = parent.frame(), global_env = .GlobalEnv,
  quiet = F, clean = TRUE)

Arguments

code
expression to call in the subprocess
calling_env
the environment of the calling function.
global_env
the global environment to load in the subprocess.
quiet
whether to echo the R command run.
clean
whether to clean the Rout files generated from the subprocess.