ktoij: Convert One-Dimensional Index k to Two-Dimensional Indices i...

Description Usage Arguments Details Value

View source: R/crochet.R

Description

ktoij is a helper function that converts a one-dimensional index k to two-dimensional indices i and j. This can be useful if, for example, two-dimensional indexing is easier to implement than one-dimensional indexing.

Usage

1
ktoij(x, k)

Arguments

x

A matrix-like object.

k

A one-dimensional index.

Details

It is assumed that all indices are one-based.

Value

A list containing indices i and j.


crochet documentation built on July 8, 2020, 5:39 p.m.