Closed WaterKnight1998 closed 2 years ago
Please provide a minimal, reproducible example. Thanks!
Please provide a minimal, reproducible example. Thanks!
test.R
library("argparse")
parser <- ArgumentParser(description='')
parser$add_argument("-x", dest = "x", type = "character", default = "testValue")
opt <- parser$parse_args()
If I execute this scrip as follows: Rscript test.R -x value1 -y value
I get at error telling me that -y
parameter is unknown.
As suggested in StackOverflow to avoid this error you must use args, unknown = parser.parse_known_args()
. More info in this link: https://stackoverflow.com/a/12818237
Howevere, this function is not implemented in your R wrapper.
Hi,
When calling
parser$parse_args()
I am getting an unrecognized arguments error. In python there is a function calledparse_known_args
that doesn't look present on your implementation.How can I solve this issue with your library?