argparse: Parse arguments of Rscript

View source: R/argparseR.R

argparseR Documentation

Parse arguments of Rscript

Description

Parse flags and returns values

Usage

argparse(args, flag, default = NULL, type = c("character", "numeric"))

Arguments

args

vector of characters as from commandArgs(trailingOnly = TRUE)

flag

name of the flag used

default

value when flag is not present

type

choose type of variable between character (default) and numeric

Value

returns value of the flag


mrblasco/argparseR documentation built on Nov. 23, 2022, 8:56 p.m.