lookup {SparkR} | R Documentation |
lookup
returns a list of values in this RDD for key key.
lookup(rdd, key) ## S4 method for signature 'RDD' lookup(rdd, key)
rdd |
The RDD to collect |
key |
The key to look up for |
a list of values in this RDD for key key
## Not run:
##D sc <- sparkR.init()
##D pairs <- list(c(1, 1), c(2, 2), c(1, 3))
##D rdd <- parallelize(sc, pairs)
##D lookup(rdd, 1) # list(1, 3)
## End(Not run)