[R] A statement over multiple lines (i.e. the ... feature in Matlab)

Bjørn-Helge Mevik bhs2 at mevik.net
Thu Oct 5 10:34:49 CEST 2006


Robin Hankin wrote:

> For the line breaking, R deals with incomplete lines by not
> executing the statement until you finish it.

Beware, however, that syntactically valid lines do get executed
immediately (at least at the prompt).  So

1 + 2
- 3

will be interpreted as two commands (returning 3 and -3,
respectively), while

1 + 2 -
3

will be interpreted as a single command (returnig 0).

-- 
Bjørn-Helge Mevik



More information about the R-help mailing list