powered by
Evaluates a list of conditions and returns yes if the conditions are satisfied. Otherwise no is returned for unmatched conditions.
yes
no
# S4 method for Column ifelse(test, yes, no)
a Column expression that describes the condition.
return values for TRUE elements of test.
TRUE
return values for FALSE elements of test.
FALSE
when
Other normal_funcs: abs, bitwiseNOT, coalesce, column, expr, greatest, isnan, least, lit, nanvl, negate, randn, rand, struct, when
abs
bitwiseNOT
coalesce
column
expr
greatest
isnan
least
lit
nanvl
negate
randn
rand
struct
# NOT RUN { ifelse(df$a > 1 & df$b > 2, 0, 1) ifelse(df$a > 1, df$a, 1) # }
Run the code above in your browser using DataLab