countByValue {SparkR} | R Documentation |
Same as countByValue in Spark.
countByValue(rdd) ## S4 method for signature 'RDD' countByValue(rdd)
rdd |
The RDD to count |
list of (value, count) pairs, where count is number of each unique value in rdd.
## Not run:
##D sc <- sparkR.init()
##D rdd <- parallelize(sc, c(1,2,3,2,1))
##D countByValue(rdd) # (1,2L), (2,2L), (3,1L)
## End(Not run)