flatMapValues {SparkR} | R Documentation |
The same as 'flatMapValues()' in Spark.
flatMapValues(X, FUN) ## S4 method for signature 'RDD,'function'' flatMapValues(X, FUN)
X |
The RDD to apply the transformation. |
FUN |
the transformation to apply on the value of each element. |
a new RDD created by the transformation.
## Not run:
##D sc <- sparkR.init()
##D rdd <- parallelize(sc, list(list(1, c(1,2)), list(2, c(3,4))))
##D collect(flatMapValues(rdd, function(x) { x }))
##D Output: list(list(1,1), list(1,2), list(2,3), list(2,4))
## End(Not run)