util.ind2sub: Convert linear indices to subscripts in column major order

View source: R/utils.R

util.ind2subR Documentation

Convert linear indices to subscripts in column major order

Description

This function is somewhat the equivalent of the Matlab ind2sub.

Usage

t <- ind2sub(j,n), then A[t$r, t$c] == A[l] if dim(A)[1] == n

Arguments

l

linear index

n

number of rows

Value

the linear index.


UCD-GW-Nitrate/gwtools documentation built on April 5, 2025, 5:01 p.m.