cleanMclapply: A function to break an mclapply into parts, save to disk and...

View source: R/misc.R

cleanMclapplyR Documentation

A function to break an mclapply into parts, save to disk and run independently

Description

A function to break an mclapply into parts, save to disk and run independently

Usage

cleanMclapply(
  x,
  applyFunc,
  ...,
  mc.cores = parallel::detectCores(),
  extraCode = "",
  nSplits = mc.cores,
  VOCAL = TRUE,
  envir = .GlobalEnv
)

Arguments

x

vector/list to apply over

applyFunc

function to apply

...

arguments for mclapply

mc.cores

number of cores to use

extraCode

character vector of setup code (each command self-contained within a cell or concatenated with ;)

nSplits

number of splits to make (if > mc.cores then R will restart more frequently and load less data at once)

VOCAL

if TRUE then output status information

envir

environment to look for variables in

Value

the concatenated outputs from applyFunc cleanMclapply(1:10,2,sqrt) cleanMclapply(1:10,2,function(x,y)x^y,y=3)


sherrillmix/dnar documentation built on July 18, 2022, 10:07 p.m.