View source: R/parse_command_line.R
parse_command_line | R Documentation |
Parse the command line
parse_command_line(args, default_help = TRUE)
args |
command line arguments |
default_help |
use built-in help generation (set to FALSE to provide eg subcmd-specific help) |
a list of parsed data
args <- commandArgs(trailingOnly = TRUE)
mydata <- parse_command_line(args)
# After parse_command_line(), access values as mydata$<var_name>, eg
# writeLines (paste("command:",mydata$command))
# writeLines (paste("subcommand:",mydata$subcmd))
# writeLines (paste("infile:", mydata$infile))
# writeLines (paste("outfile:",mydata$outfile))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.