Hallo all

 

Not sure if it is appropriate place but as I am not involved in r-devel list
I post here.

 

Documentation for Control (if, for, while, .) is missing "if else" command.
Although it can be find online elsewhere I believe that adding it either as
an example or as a third entry and paragraph about nested if's could be
beneficial.

 

if(cond) cons.expr  else if (cond) alt.expr else alt2.expr

 

Nested if expressions are better realized with "else if" instead of sequence
of plain "else" control statements especially when using several of them.

Best regards

Petr

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to