multidplyr (version 0.0.0.9000)

cluster_eval: Evaluate arbitrary code on each node

Description

Note that you can only evaluate in the global environment: it doesn't seem to make much sense to evaluate elsewhere on remote nodes.

Usage

cluster_eval(cluster, expr)

cluster_eval_(cluster, expr)

Arguments

cluster

Cluster to work on

expr

Expression to evaluate. cluster_eval uses non-standard evaluation to automatically quote. For cluster_eval_, you must quote it yourself.

Examples

Run this code
# NOT RUN {
cl <- get_default_cluster()
cl %>% cluster_eval(1 + 1)
cl %>% cluster_eval_(quote(1 + 1))
# }

Run the code above in your browser using DataCamp Workspace