Hello,
parse() is supposed to detect incomplete instructions, isn't it?
For instance:
# Correct code
msg <- 'log(10)'
mc <- textConnection(msg)
parse(mc)
# Now, an incomplete code
msg <- 'log('
mc <- textConnection(msg)
parse(mc)
Error in parse(mc) : unexpected end of input at
2: log(
# Now, another incomplete code (character string not finished)
msg <- 'text <- "some incomplete string'
mc <- textConnection(msg)
parse(mc)
expression(text <- "some incomplete string\n")
I don't understand why parse() does not complain in this third case, and
why it "finishes" my string and adds a '\n' at its end. Does anybody
could explain me,... or is this a bug