collapsing indices

Share:

Description

Transforms multiple indices into a unique index following the storage order of array elements by R.

Usage

1
unex(xv, di, check=TRUE)

Arguments

xv

a N by K matrix, each row corresponding to uple of indices. each column must be a factor.

di

dimensions of the K indices

check

must be the consistency between the argument xv and di be checked?

Value

A vector of size N with the unique index values

Examples

1
2
3
 rbsb3k("RESET"); # needed only for R checking, to be forgotten
 uu <- rbsb.dfr1;
 print(cbind(uu, unex(uu, 3:4)));

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.