Learn R Programming

rethinking (version 2.13)

mcreplicate: Multi-core version of replicate

Description

Uses the parallel library to distribute replicate processing across cores.

Usage

mcreplicate(n, expr, refresh = 0.1, mc.cores=2 )

Arguments

n

Number of replications

expr

Code to replicate

refresh

Status update refresh interval

mc.cores

Number of cores to use

Value

Details

This function uses mclapply to distribute replications across cores. It then simplifies the result to an array.

See Also

mclapply, replicate