systemR {R.utils} | R Documentation |
Launches another R process from within R
Description
Launches another R process from within R via system
() by automatically locating the
R executable, cf [1].
Usage
## Default S3 method:
systemR(command="", ..., Rcommand="R", verbose=FALSE)
Arguments
command |
A |
... |
Additional arguments passed to |
Rcommand |
A |
verbose |
Value
Returns what system
() returns.
Author(s)
Henrik Bengtsson
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
().
Examples
res <- systemR(paste("--slave -e", shQuote("cat(runif(1))")), intern=TRUE)
cat("A random number: ", res, "\n", sep="")
[Package R.utils version 2.12.3 Index]