argsParser: Parser of an argument string

Description Usage Arguments Examples

Description

This command parses ...DESCRITION TO DO !!!

Usage

1
argsParser(option, args, sep = " ", novalue_response = NULL)

Arguments

option

character strings containg options (or flag) whose values

args

String containing all the arguments of an R script

sep

separator character. Default is " ". If it is of length 2, the first is seperator among different options, the second is betwwen option name and its value.

novalue_response

value used in case the option is missing. Default is NULL.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
args <- "--value  6  --fruit apple"

option <- "--fruit"

value <- argsParser(option=option,args=args)

option2 <- "--jobs"

value2 <- argsParser(option=option2,args=args)
value22 <- argsParser(option=option2,args=args,novalue_response="./")
 args_b <- "value=6 , fruit=apple"

value <- argsParser(option=option,args=args_b,sep=c(",","="))

ecor/geotopOptim documentation built on May 15, 2019, 8:54 p.m.