ncol {SparkR}R Documentation

Returns the number of columns in a DataFrame

Description

Returns the number of columns in a DataFrame

Usage

## S4 method for signature 'DataFrame'
ncol(x)

Arguments

x

a SparkSQL DataFrame

Examples

## Not run: 
##D sc <- sparkR.init()
##D sqlContext <- sparkRSQL.init(sc)
##D path <- "path/to/file.json"
##D df <- jsonFile(sqlContext, path)
##D ncol(df)
## End(Not run)

[Package SparkR version 1.5.1 Index]