Skip to contents

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

Usage

take(x, num)

# S4 method for SparkDataFrame,numeric
take(x, num)

Arguments

x

a SparkDataFrame.

num

number of rows to take.

Note

take since 1.4.0

Examples

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