apwi: Apply function with an iterator

Description Usage Arguments Details

View source: R/loops.R

Description

Performs a loop over a vector or a list, performing an action on each element. The action has access to an indexing variable marking position in x.

Usage

1
apwi(x, fun, ...)

Arguments

x

vector or list

fun

function. The structure of the function should be function(i, x) where 'i' is an index variable and 'x' is the data.

...

parameters passed on to FUN

Details

To provide the iterator, the implementation actually uses a for loop.

The names is short for: (ap)ply (w)ith (i)terator


tkonopka/shrt documentation built on March 5, 2020, 2:51 p.m.