Learn R Programming

SparkR (version 2.4.6)

otherwise: otherwise

Description

If values in the specified column are null, returns the value. Can be used in conjunction with when to specify a default value for expressions.

Usage

otherwise(x, value)

# S4 method for Column otherwise(x, value)

Arguments

x

a Column.

value

value to replace when the corresponding entry in x is NA. Can be a single value or a Column.

See Also

Other colum_func: alias(), between(), cast(), endsWith(), over(), startsWith(), substr()