[R] if documentation

PIKAL Petr petr@p|k@| @end|ng |rom prechez@@cz
Wed Dec 7 08:04:38 CET 2022


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



More information about the R-help mailing list