Skip to contents

Returns the number of columns in a SparkDataFrame

Usage

# S4 method for class 'SparkDataFrame'
ncol(x)

Arguments

x

a SparkDataFrame

Note

ncol since 1.5.0

Examples

if (FALSE) { # \dontrun{
sparkR.session()
path <- "path/to/file.json"
df <- read.json(path)
ncol(df)
} # }