systemR | R Documentation |
Launches another R process from within R via system
() by automatically locating the
R executable, cf [1].
## Default S3 method:
systemR(command="", ..., Rcommand="R", verbose=FALSE)
command |
A |
... |
Additional arguments passed to |
Rcommand |
A |
verbose |
A |
Returns what system
() returns.
Henrik Bengtsson
[1] R-devel thread 'Best way to locate R executable from within R?', May 22, 2012.
The R executable is located using R.home
(), which
is then launched using system
().
res <- systemR(paste("--slave -e", shQuote("cat(runif(1))")), intern=TRUE)
cat("A random number: ", res, "\n", sep="")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.