1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Do not modify this file since it was automatically generated from:
%
% systemR.R
%
% by the Rdoc compiler part of the R.oo package.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\name{systemR}
\alias{systemR.default}
\alias{systemR}
\alias{systemR}
\title{Launches another R process from within R}
\usage{
\method{systemR}{default}(command="", ..., Rcommand="R", verbose=FALSE)
}
\description{
Launches another R process from within R via \code{\link[base]{system}}() by automatically locating the
R executable, cf [1].
}
\arguments{
\item{command}{A \code{\link[base]{character}} string be appended to the \code{\link[base]{system}}()
call. If a \code{\link[base]{vector}}, then the strings are concatenated separated
with a space.}
\item{...}{Additional arguments passed to \code{\link[base]{system}}().}
\item{Rcommand}{A \code{\link[base]{character}} string specifying the basename of
the R executable.}
\item{verbose}{A \code{\link[base]{logical}} or a \code{\link{Verbose}} object.}
}
\value{
Returns what \code{\link[base]{system}}() returns.
}
\examples{
res <- systemR("--slave -e cat(runif(1))", intern=TRUE)
cat("A random number: ", res, "\n", sep="")
}
\author{Henrik Bengtsson}
\references{
[1] R-devel thread 'Best way to locate R executable from within R?',
May 22, 2012.
}
\seealso{
The R executable is located using \code{\link[base]{R.home}}(), which
is then launched using \code{\link[base]{system}}().
}
\keyword{programming}
\keyword{IO}
|