[R] Multiple line commands in R scripting
jim at bitwrit.com.au
Mon Oct 26 03:26:25 CET 2009
Neil Stewart wrote:
> I'm wondering whether there is a character to let R know to expect
> more input for a command on subsequent lines.
Not that I know of, but I use exactly the method you noticed, the
trailing operator. There was a discussion similar to this not long ago
about the use of the semicolon as a line terminator. If the trailing
operator is a problem, you can wrap the whole statement in parentheses:
The interpreter will assume that more input is needed from the
unbalanced parenthesis in the first line. An unbalanced quote would also
cause the interpreter to wait for more input, but I don't think it would
be of any use in solving your problem.
More information about the R-help