Learn R Programming

ff (version 4.5.0)

matcomb: Array: make matrix indices from row and columns positions

Description

create matrix indices from row and columns positions

Usage

matcomb(r, c)

Value

a k by 2 matrix of matrix indices where k = length(r) * length(c)

Arguments

r

integer vector of row positions

c

integer vector of column positions

Author

Jens Oehlschlägel

Details

rows rotate faster than columns

See Also

Examples

Run this code
  matcomb(1:3, 1:4)
  matcomb(2:3, 2:4)

Run the code above in your browser using DataLab