ifelse {SparkR} | R Documentation |
Evaluates a list of conditions and returns yes
if the conditions are satisfied.
Otherwise no
is returned for unmatched conditions.
## S4 method for signature 'Column' ifelse(test, yes, no)
test |
a Column expression that describes the condition. |
yes |
return values for |
no |
return values for |
ifelse since 1.5.0
Other normal_funcs: abs
,
bitwiseNOT
, coalesce
,
column
, expr
,
greatest
, isnan
,
least
, lit
,
nanvl
, negate
,
randn
, rand
,
struct
, when
## Not run:
##D ifelse(df$a > 1 & df$b > 2, 0, 1)
##D ifelse(df$a > 1, df$a, 1)
## End(Not run)