MapOrDoCall: 'Map'/'lapply' all in one

View source: R/MapOrDoCall.R

MapOrDoCallR Documentation

Map/lapply all in one

Description

Usually run after identifyVectorArgs which will separate the arguments into vectors of values for a call to Map, and arguments that have only one value (passed to MoreArgs in Map). If all are single length arguments, then it will pass to lapply. If a cl is provided and is non-NULL, then it will pass all arguments to clusterMap or clusterApply.

Usage

MapOrDoCall(fn, multiple, single, useCache, cl = NULL)

Arguments

fn

The function that will be run via Map/clusterMap.

multiple

This a list the arguments that Map will cycle over.

single

Passed to MoreArgs in the mapply function.

useCache

Logical indicating whether to use the cache.

cl

A cluster object or NULL.

See Also

identifyVectorArgs


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