multi-word argument
Arguments such as --plot-style aren't properly set anymore. I used to be able to test
if (argv$plot-style
) == "bar")
but now argv$plot-style
or any combination of word separated by '-' returns NULL now
Comments (5)
-
repo owner -
repo owner I just checked... there is no way that
argv$plot-style
used to work. It indeed generates a parse error, because it is interpreted asargv$plot - style
by R. Ifstyle
is defined, this would generate a silent bug.Your old code is very likely bugged, unless you actually wrote
argv[["plot-style"]]
.Again, use
_
instead of-
in your variable names:argv$plot_style
. -
repo owner - changed status to invalid
Not a bug.
-
Yeah sorry my bad :)
I saw the status of the v0.4 just after...
I had no account so i couldn't edit my message and didn't want to create one... The misunderstanding comes from my use of " ` " before and after plot-style. It was interpreted as markdown styling by bitbucket but was actually raw R text...
-
repo owner Sorry about the compatibility break. I was hesitant about the automatic substitution (requested by another user)... but in the end I decided that it is better to do it now rather than later.
- Log in to comment
An incompatibility was introduced in v0.4 where
-
are replaced with_
in argument names. (This is documented in the README.)I must say that I am surprised that
argv$plot-style
used to work... this should have been a parse error in R.Now, you'll instead need to write:
The only character substitution that
argparser
does is to convert-
to_
.