Skip to content
Prev 27123 / 63461 Next

parse() does not complain for not finished strings?

Philippe Grosjean wrote:
A buglet at least. It is not parsing per se that does it:

 > parse(text=msg)
Error in parse(text = msg) :
  unexpected end of input in "text <- "some incomplete string"

but it happens whenever you parse from a file or connection e.g.

$ cat > xxx
"incom
$ R
[....]
 > source("xxx")
 > .Last.value
$value
[1] "incom\n"

$visible
[1] TRUE