rcode {R.rsp} | R Documentation |
Compiles an RSP document and returns the generated source code script
Description
Compiles an RSP document and returns the generated source code script.
Usage
## Default S3 method:
rcode(..., file=NULL, path=NULL, output=NULL, workdir=NULL, envir=parent.frame(),
args="*", verbose=FALSE)
Arguments
... |
|
file , path |
Alternatively, a file, a URL or a |
output |
A |
workdir |
The working directory to use after parsing and
preprocessing.
If argument |
envir |
The |
args |
A named |
verbose |
See |
Value
Returns an RspFileProduct
if possible,
otherwise an RspSourceCode
.
Author(s)
Henrik Bengtsson
See Also
Examples
# RSP-embedded text to an R script
code <- rcode("Current time is <%=Sys.time()%>\n")
cat(code, sep="\n")
# RSP-embedded text to a shell script
code <- rcode("Current time is <%=date%>\n", language="sh")
cat(code, sep="\n")