processCommandLine {ramwas} | R Documentation |
The pipeline parameters can be provided via command line.
For example:
R pipeline.r dirproject="/project" maxrepeats=0 modeloutcome="Age"
Each command line argument is treated as an R statement.
All variables defined this way are collected in a list which is returned.
processCommandLine(.arg = NULL)
.arg |
Vector of command line parameters. Obtained from
|
If a command line argument defines variable "fileparam"
,
it is assumed to be a filename, and the file with this name
is scanned for extra pipeline parameters,
as by parametersFromFile
.
Returns the list with all the variables set by the statement in the command line.
Variables with names starting with period (.) are ignored.
Andrey A Shabalin andrey.shabalin@gmail.com
See vignettes: browseVignettes("ramwas")
.
filename = tempfile() # Assume command line with two components: # dirproject="." # modelcovariates=c("Age","Sex") arg = c( "dirproject = \".\"", "modelcovariates = c(\"Age\",\"Sex\")") # Process the command line param = processCommandLine(arg) # Show the list print(param)