[R] argh .. if/else .. why?

Esmail esmail.js at gmail.com
Mon Feb 15 15:35:57 CET 2010


On 15-Feb-10 09:13, jim holtman wrote:
>  This is a common question.  The problem
> is basically when input commands at the command line, when you hit the
> carriage return it is assuming there is a complete command.
> Within a function, or a block like the 'for' loop, the statement is
> not complete until the closing bracket, so internally it will be
> parsed correctly, but just get into the habit of making sure the
> if/else are on the same line or bracket.

Ah .. so the fact that this is inside a block (in this case a function)
makes a difference .. I see .. well this is certainly different from other
languages I have worked with, but the explanation is clear.

Thanks you!

Esmail



More information about the R-help mailing list