doInStataCluster: Execute multiple pieces of Stata code (tasks/jobs) in a...

View source: R/concurrent.R

doInStataClusterR Documentation

Execute multiple pieces of Stata code (tasks/jobs) in a "cluster" of multiple Stata instances

Description

This is a parLapply-like wrapper around doInStata that allows executing multiple pieces of Stata code in a parallel/concurrent manner.

Usage

doInStataCluster(cl, X, isStataReadyTimeout = 1, ...)

Arguments

cl

A "cluster" – a list of objects of S3 class 'StataID', possibly generated by startStataCluster.

X

A vector (list of atomic character vectors, or an atomic character vector) of jobs/tasks (Stata code) to be executed across different Stata instances.

isStataReadyTimeout

Passed to argument timeout of isStataReady that is used internally to allocate jobs/tasks only to non-busy Stata instances. Default: 1. See the warning for argument timeout in isStataReady documentation.

...

Further arguments passed to doInStata.

Value

A list of objects returned by doInStata in the order corresponding to the order of jobs/tasks in X.


alekrutkowski/RStataLink documentation built on March 22, 2023, 2:18 a.m.