rrq_envir: Create simple worker environments

View source: R/envir.R

rrq_envirR Documentation

Create simple worker environments

Description

Helper function for creating a worker environment. This function exists to create a function suitable for passing to rrq_worker_envir_set for the common case where the worker should source some R scripts and/or load some packages on startup. This is a convenience wrapper around defining your own function, covering the most simple case. If you need more flexibility you should write your own function.

Usage

rrq_envir(packages = NULL, sources = NULL)

Arguments

packages

An optional character vector of

sources

An optional character vector of scripts to read. Typically these will contain just function definitions but you might read large data objects here too.

Value

A function suitable for passing to rrq_worker_envir_set, which can set (or update) the environment for your workers.


richfitz/rrq documentation built on April 25, 2024, 11:14 a.m.