cast {SparkR}R Documentation

Casts the column to a different data type.

Description

Casts the column to a different data type.

Usage

## S4 method for signature 'Column'
cast(x, dataType)

cast(x, dataType)

Arguments

x

a Column.

dataType

a character object describing the target data type. See Spark Data Types for available data types.

Note

cast since 1.4.0

See Also

Other colum_func: alias, alias,Column-method; between, between, between,Column-method; endsWith, endsWith, endsWith,Column-method; otherwise, otherwise, otherwise,Column-method; over, over, over,Column,WindowSpec-method; startsWith, startsWith, startsWith,Column-method; substr, substr,Column-method

Examples

## Not run: 
##D   cast(df$age, "string")
## End(Not run)

[Package SparkR version 2.2.0 Index]