Skip to contents

Returns the number of columns in a SparkDataFrame

Usage

# S4 method for SparkDataFrame
ncol(x)

Arguments

x

a SparkDataFrame

Note

ncol since 1.5.0

Examples

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