spark.lapply: Run a function over a list of elements, distributing the...

Description Usage Arguments Details Value Note Examples

View source: R/context.R

Description

Run a function over a list of elements, distributing the computations with Spark. Applies a function in a manner that is similar to doParallel or lapply to elements of a list. The computations are distributed using Spark. It is conceptually the same as the following code: lapply(list, func)

Usage

1

Arguments

list

the list of elements

func

a function that takes one argument.

Details

Known limitations:

Value

a list of results (the exact type being determined by the function)

Note

spark.lapply since 2.0.0

Examples

1
2
3
4
5
## Not run: 
sparkR.session()
doubled <- spark.lapply(1:10, function(x) {2 * x})

## End(Not run)

SparkR documentation built on June 3, 2021, 5:05 p.m.