limit {SparkR} | R Documentation |
Limit the resulting DataFrame to the number of rows specified.
## S4 method for signature 'DataFrame,numeric' limit(x, num) limit(x, num)
x |
A SparkSQL DataFrame |
num |
The number of rows to return |
A new DataFrame containing the number of rows specified.
## Not run:
##D sc <- sparkR.init()
##D sqlContext <- sparkRSQL.init(sc)
##D path <- "path/to/file.json"
##D df <- jsonFile(sqlContext, path)
##D limitedDF <- limit(df, 10)
## End(Not run)