keys {SparkR}R Documentation

Return an RDD with the keys of each tuple.

Description

Return an RDD with the keys of each tuple.

Usage

keys(rdd)

## S4 method for signature 'RDD'
keys(rdd)

Arguments

rdd

The RDD from which the keys of each tuple is returned.

Examples

## Not run: 
##D sc <- sparkR.init()
##D rdd <- parallelize(sc, list(list(1, 2), list(3, 4)))
##D collect(keys(rdd)) # list(1, 3)
## End(Not run)

[Package SparkR version 0.1 Index]