SparkR (version 2.1.2)

struct: struct

Description

Creates a new struct column that composes multiple input columns.

Usage

struct(x, ...)

# S4 method for characterOrColumn struct(x, ...)

Arguments

x

a column to compute on.

...

optional column(s) to be included.

See Also

Other normal_funcs: abs, bitwiseNOT, coalesce, column, expr, greatest, ifelse, isnan, least, lit, nanvl, negate, randn, rand, when

Examples

Run this code
# NOT RUN {
struct(df$c, df$d)
struct("col1", "col2")
# }

Run the code above in your browser using DataCamp Workspace