take,DataFrame,numeric-method {SparkR}R Documentation

Take the first NUM rows of a DataFrame and return a the results as a data.frame

Description

Take the first NUM rows of a DataFrame and return a the results as a data.frame

Usage

## S4 method for signature 'DataFrame,numeric'
take(x, num)

Examples

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

[Package SparkR version 1.4.1 Index]