Skip to content

R package that makes easier to pass arguments to R scripts

Notifications You must be signed in to change notification settings

mrblasco/argparseR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

argparseR

R package that intends to mimic the terrific argparse package but in a way to better suit my own workflow.

Usage

Here's an example. Write a script with the following commands and save it as myscript.R

args <- commandArgs(trailingOnly = TRUE)
library(argparseR)
min_arg <- argparse(args, "--min", type="numeric", default=1)
max_arg <- argparse(args, "--max", default=34, type="numeric")
print(c(min_arg, max_arg)) 

Then call the script from the terminal

Rscript myscript.R --min 12 --max 23

Installation

library(devtools)
install_github("mrblasco/argparseR")

About

R package that makes easier to pass arguments to R scripts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published