Parses the trailing arguments of Rscript s0_init.R with optparse. The
two valid flags are --check and --feasibility, and each defaults to
FALSE.
Usage
tte_s0_flags(args = commandArgs(trailingOnly = TRUE))Details
The function stops on any other argument, an abbreviation of a valid flag
included. It also stops when --check and --feasibility both appear.
Each error message names the two valid flags.
See also
Other tte_plan:
registrystudy_load(),
tte_stage(),
tteplan_load(),
tteplan_locate_and_load()
Examples
tte_s0_flags(character(0))
#> $check
#> [1] FALSE
#>
#> $feasibility
#> [1] FALSE
#>
tte_s0_flags("--check")
#> $check
#> [1] TRUE
#>
#> $feasibility
#> [1] FALSE
#>
tte_s0_flags("--feasibility")
#> $check
#> [1] FALSE
#>
#> $feasibility
#> [1] TRUE
#>
