I am using optparse
in to parse arguments in R. Then I call the R code from command line and pass arguments as follows Rscript myscript.R -a xx -b yy
. It works well, but I am a bit confused with the usage of 1-letter arguments like -a
, -b
, etc.
In my case I have 20 arguments… It's very inconvenient to assign a letter to each argument.
make_option(c("-o", "--output_path"), type="character"),
make_option(c("-t", "--data_type"), type="character")
If I use complete names --output_path
from command line, I get an error.
How to solve this issue?