systemR

0th

Percentile

Launches another R process from within R

Launches another R process from within R via system() by automatically locating the R executable, cf [1].

Keywords
programming, IO
Usage
## S3 method for class 'default':
systemR(command="", ..., Rcommand="R", verbose=FALSE)
Arguments
command
A character string be appended to the system() call. If a vector, then the strings are
...
Additional arguments passed to system().
Rcommand
A character string specifying the basename of the R executable.
verbose
A logical or a Verbose object.
Value

  • Returns what system() returns.

References

[1] R-devel thread 'Best way to locate R executable from within R?', May 22, 2012.

See Also

The R executable is located using R.home(), which is then launched using system().

Aliases
  • systemR.default
  • systemR
  • systemR
Examples
res <- systemR("--slave -e cat(runif(1))", intern=TRUE)
cat("A random number: ", res, "", sep="")
Documentation reproduced from package R.utils, version 1.28.4, License: LGPL (>= 2.1)

Community examples

Looks like there are no examples yet.