Skip to content

Instantly share code, notes, and snippets.

@thoolihan
Last active July 19, 2019 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thoolihan/5a92ecfb05326b41f0fd62744eb839db to your computer and use it in GitHub Desktop.
Save thoolihan/5a92ecfb05326b41f0fd62744eb839db to your computer and use it in GitHub Desktop.
Run `Rscript args.R` to see how R command line arguments work
args <- commandArgs()
trailing_args <- commandArgs(trailingOnly = TRUE)
print(args)
writeLines("\n====Just Trailing====\n\n")
print(trailing_args)
@thoolihan
Copy link
Author

Save as args.R and Run Rscript args.R to see how R command line arguments work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment