rscript

0th

Percentile

Compiles an RSP string and returns the generated source code script

Compiles an RSP string and returns the generated source code script.

Keywords
internal, file, IO
Usage
## S3 method for class 'default':
rscript(..., file=NULL, path=NULL, envir=parent.frame(), args="*", verbose=FALSE)
Arguments
...
character strings with RSP markup.
file, path
Alternatively, a file, a URL or a connection from with the strings are read. If a file, the path is prepended to the file, iff given.
envir
The environment in which the RSP string is preprocessed and evaluated.
args
A named list of arguments assigned to the environment in which the RSP string is parsed and evaluated. See cmdArgs.
verbose
See Verbose.
Value

See Also

rcat() and rfile().

Aliases
  • rscript.default
  • rscript
  • rscript.RspString
  • rscript.RspDocument
Examples
# RSP-embedded text to an R script
code <- rscript("Current time is <%=Sys.time()%>
")
cat(code, sep="")

# RSP-embedded text to a shell script
code <- rscript("Current time is <%=date%>
", language="sh")
cat(code, sep="")
Documentation reproduced from package R.rsp, version 0.9.17, License: LGPL (>= 2.1)

Community examples

Looks like there are no examples yet.