[R] R multiline expression grief

Wacek Kusnierczyk Waclaw.Marcin.Kusnierczyk at idi.ntnu.no
Fri Mar 13 14:26:35 CET 2009


jim holtman wrote:
>
>   
>> if (1 == 1) {print (TRUE)
>>     
> + } else {print (FALSE)}
> [1] TRUE
>   
>
> so the parse knows that the initial 'if' is not complete on the single line.
>   

... and likewise the original code could be rewritten as

    f <- { a
       + b
       + c }

vQ




More information about the R-help mailing list