Closed cchng closed 9 years ago
Hi Carolyn,
You need a '=' with your long form option if its argument leads off with a -
. In the vignette all example "long form" arguments were of the form --mean=-4.3
which would have worked in your case. Since your option argument does not include any spaces you won't need the quotes.
trevorld@trevorld-Bonobo-Extreme:~$ Rscript test.r --range=-0.1,1
[1] "-0.1,1"
Best,
Trevor
Ahh I overlooked that detail, thanks Trevor!
Best, Carolyn
Hi,
I'm running into an error when my argument has a leading hyphen.
Code:
This doesn't seem to be a problem when type is "numeric" and if I only had a single number - but I wanted an input that takes in a list of numbers, including negative numbers, so I used character instead. Any other suggestions welcomed!
Output when argument doesn't have a hyphen:
Output for argument with a leading hyphen:
Tried putting quotes around the argument but that doesn't seem to work either:
Thanks for looking into this!
Carolyn