| commandArgs | R Documentation |
Provides access to a copy of the command line arguments supplied whenthisR session was invoked.
commandArgs(trailingOnly = FALSE)
trailingOnly | logical. Should only arguments after--args be returned? |
These arguments are captured before the standardR command lineprocessing takes place. This means that they are the unmodifiedvalues. This is especially useful with the--argscommand-line flag toR, as all of the command line after that flagis skipped.
A character vector containing the name of the executable and theuser-supplied command line arguments. The first element is the nameof the executable by whichR was invoked. The exact form of thiselement is platform dependent: it may be the fully qualified name, orsimply the last component (or basename) of the application, or for anembeddedR it can be anything the programmer supplied.
IftrailingOnly = TRUE, a character vector of those arguments(if any) supplied after--args.
R.home(),StartupandBATCH
commandArgs()## Spawn a copy of this application as it was invoked,## subject to shell quoting issues## system(paste(commandArgs(), collapse = " "))
Add the following code to your website.
For more information on customizing the embed code, readEmbedding Snippets.
