Learn R Programming

nat (version 1.8.24)

sub2ind: Find 1D index given n-dimensional indices

Description

Emulates the MATLAB function sub2ind.

Usage

sub2ind(dims, indices)

Arguments

dims

vector of dimensions of object to index into.

indices

vector of n-dimensional indices.