.BG
.FN if
.FN else
.FN ||
.FN &&
.TL
Conditional Expressions and Operators
.CS
if(test) true.expr
if(test) true.expr else false.expr

e1 || e2
e1 && e2
.AG test,
.AG e1,e2
logical expressions of length 1.
.RT
The `if' construct in the language evaluates `test'.
If it is `TRUE' (i.e., if the first element of the result coerced to
mode `logical' is `TRUE'), then
`true.expr' is evaluated and returned as the value of the whole expression.
Otherwise, the value of the expression is `false.expr' if present, or an
empty value otherwise.
An `NA' value for the test causes an error.
.PP
`&&' returns `TRUE' if both of its operands are `TRUE' (in the same sense
as `test' above).  If the left operand is not `TRUE', the right operand
is not evaluated.
.PP
`||' returns `TRUE' if one of its operands is `TRUE' (in the same sense
as `test' above).  If the left operand is `TRUE', the right operand
is not evaluated.
.SA
`Logical' for element-wise logical operations (`|', `&', `!' and `xor');
`ifelse' for parallel selection of values;
and `switch' for multi-branch selections.
.EX
if(mode(x)!="character" && min(x)>0) log(x)
  # log(x) is an error if mode(x) is "character"
.WR
