Description Usage Arguments Details Value See Also Examples
Runs an expression in the local compute context
1 | local_exec(expr, context = "local")
|
expr |
An expression to execute. Normally something that depends on the compute context, such as |
context |
The compute context in which to execute |
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.
The value of expr
.
1 2 3 4 5 6 | ## Not run:
# set the compute context to Spark
rxSparkConnect()
local_exec(rxDataStep(mtcars))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.