getopt and commandArgs examples, and AF/OR update to use getopt()
This commit is contained in:
parent
864f814e1b
commit
f9a8ed3dc7
3 changed files with 66 additions and 21 deletions
9
scripts/commandArgs-example.r
Executable file
9
scripts/commandArgs-example.r
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env Rscript
|
||||
print('R Argument Test')
|
||||
|
||||
cmd <- paste(commandArgs(), collapse=" ")
|
||||
cat("How R was invoked:\n");
|
||||
cat(cmd, "\n")
|
||||
|
||||
args <- commandArgs(trailingOnly = TRUE)
|
||||
cat(c('Command Line Arguments supplied: ', args))
|
Loading…
Add table
Add a link
Reference in a new issue