| ktoij {crochet} | R Documentation |
Convert One-Dimensional Index k to Two-Dimensional Indices i and j
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
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.
[Package crochet version 2.3.0 Index]