Map2: 'Map' and 'parallel::clusterMap' together

View source: R/MapOrDoCall.R

Map2R Documentation

Map and parallel::clusterMap together

Description

This will send to Map or clusterMap, depending on whether cl is provided. Because they use different argument names for the main function to call, leave that argument unnamed.

Usage

Map2(f, ..., cl = NULL)

Arguments

f

passed as f to Map or fun to clusterMap

...

passed to Map or clusterMap

cl

A cluster object, passed to clusterMap

Examples


## Not run: 
a <- 1:5
Map2(a, f = function(x) x)


## End(Not run)

PredictiveEcology/pemisc documentation built on Sept. 19, 2022, 7 p.m.