Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201839

Is it mandatory to use 1 letter arguments in optparse?

$
0
0

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?


Viewing all articles
Browse latest Browse all 201839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>