lookup {SparkR}R Documentation

Look up elements of a key in an RDD

Description

lookup returns a list of values in this RDD for key key.

Usage

lookup(rdd, key)

## S4 method for signature 'RDD'
lookup(rdd, key)

Arguments

rdd

The RDD to collect

key

The key to look up for

Value

a list of values in this RDD for key key

Examples

## 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)

[Package SparkR version 0.1 Index]