local_exec: Runs an expression in the local compute context

Description Usage Arguments Details Value See Also Examples

Description

Runs an expression in the local compute context

Usage

1
local_exec(expr, context = "local")

Arguments

expr

An expression to execute. Normally something that depends on the compute context, such as rxDataStep.

context

The compute context in which to execute expr. Defaults to local.

Details

This function is useful when you are working with datasets in both the native filesystem and HDFS. The workhorse RevoScaleR function for data transformation, rxDataStep, will complain if you are in a distributed compute context such as RxHadoopMR or RxSpark, and you want to process a dataset in the native filesystem. You can wrap your code inside a local_exec call to switch to the local compute context temporarily, and then switch back when it has finished running.

Value

The value of expr.

See Also

eval

Examples

1
2
3
4
5
6
## Not run: 
# set the compute context to Spark
rxSparkConnect()
local_exec(rxDataStep(mtcars))

## End(Not run)

RevolutionAnalytics/dplyrXdf documentation built on June 3, 2019, 9:08 p.m.