I am trying to parse a character string in R.
R throws an \"unexpected symbol\" or \"unexpected end of input\" exception when there is a digit followed by a hyphen in the s
The point of parse is to turn your input text into an R-language expression. Just as if you typed
abc12-3def
at the R prompt, it would throw a syntax error, so too will parse. You can't just throw arbitrary text at it and assume it'll give you something sensible.