loop: for-loop prototyping

View source: R/loop.R

loopR Documentation

for-loop prototyping

Description

for-loop prototyping

Usage

loop(expr, ..., type = "along")

Arguments

expr

an expression of the body of a loop.

...

dynamic dots that include objects for the body of the loop.

type

the type of loop to construct. along for a sequence alona vector, row for a sequence along the rows of an object.

Examples

x = as.list(1:5)
loop({ y[[i]] <- x[[i]] + 1}, x)

D-Se/ergo documentation built on May 24, 2022, 5:20 p.m.