when {SparkR} | R Documentation |
Evaluates a list of conditions and returns one of multiple possible result expressions. For unmatched expressions null is returned.
## S4 method for signature 'Column' when(condition, value) when(condition, value)
condition |
the condition to test on. Must be a Column expression. |
value |
result expression. |
when since 1.5.0
Other normal_funcs: Column-class
,
column
, column
,
column
,
column,character-method
,
column,jobj-method
; abs
,
abs,Column-method
;
bitwiseNOT
, bitwiseNOT
,
bitwiseNOT,Column-method
;
coalesce
, coalesce
,
coalesce
,
coalesce,Column-method
,
coalesce,SparkDataFrame-method
;
expr
, expr
,
expr,character-method
;
from_json
, from_json
,
from_json,Column,structType-method
;
greatest
, greatest
,
greatest,Column-method
;
ifelse
, ifelse,Column-method
;
is.nan
, is.nan,Column-method
,
isnan
, isnan
,
isnan,Column-method
; least
,
least
, least,Column-method
;
lit
, lit
,
lit,ANY-method
; nanvl
,
nanvl
, nanvl,Column-method
;
negate
, negate
,
negate,Column-method
; randn
,
randn
, randn
,
randn,missing-method
,
randn,numeric-method
; rand
,
rand
, rand
,
rand,missing-method
,
rand,numeric-method
; struct
,
struct
,
struct,characterOrColumn-method
;
to_json
, to_json
,
to_json,Column-method
## Not run: when(df$age == 2, df$age + 1)