tar_rep_run: Run a batch in a 'tar_rep()' archetype.

View source: R/tar_rep_raw.R

tar_rep_runR Documentation

Run a batch in a tar_rep() archetype.

Description

Internal function needed for tar_rep(). Users should not invoke it directly.

Usage

tar_rep_run(command, batch, reps, iteration, rep_workers)

Arguments

command

Expression object, command to replicate.

batch

Numeric of length 1, batch index.

reps

Numeric of length 1, number of reps per batch.

iteration

Character, iteration method.

rep_workers

Positive integer of length 1, number of local R processes to use to run reps within batches in parallel. If 1, then reps are run sequentially within each batch. If greater than 1, then reps within batch are run in parallel using a PSOCK cluster.

Value

Aggregated results of multiple executions of the user-defined command supplied to tar_rep(). Depends on what the user specifies. Common use cases are simulated datasets.


tarchetypes documentation built on Oct. 4, 2023, 5:08 p.m.