repartition,DataFrame,numeric-method {SparkR} | R Documentation |
Return a new DataFrame that has exactly numPartitions partitions.
## S4 method for signature 'DataFrame,numeric' repartition(x, numPartitions)
x |
A SparkSQL DataFrame |
numPartitions |
The number of partitions to use. |
## Not run:
##D sc <- sparkR.init()
##D sqlContext <- sparkRSQL.init(sc)
##D path <- "path/to/file.json"
##D df <- jsonFile(sqlContext, path)
##D newDF <- repartition(df, 2L)
## End(Not run)