loopIndex: loopIndex

View source: R/A003_loopIndex.R

loopIndexR Documentation

loopIndex

Description

Calculates i modulo n, but returns numbers in the range from 1 to n instead of 0 to n-1.

Usage

loopIndex(i, n)

Arguments

i

a vector

n

a number

Value

Returns the vector i modulo n in the range 1 to n

Examples

loopIndex(1:10,4)

R-graphic-design/RGD documentation built on Jan. 2, 2023, 10:30 p.m.