reduce {SparkR} | R Documentation |
This function reduces the elements of this RDD using the specified commutative and associative binary operator.
reduce(rdd, func) ## S4 method for signature 'RDD' reduce(rdd, func)
rdd |
The RDD to reduce |
func |
Commutative and associative function to apply on elements of the RDD. |
## Not run:
##D sc <- sparkR.init()
##D rdd <- parallelize(sc, 1:10)
##D reduce(rdd, "+") # 55
## End(Not run)