Learn R Programming

ff (version 4.0.4)

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

Description

create matrix indices from row and columns positions

Usage

matcomb(r, c)

Arguments

r

integer vector of row positions

c

integer vector of column positions

Value

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

Details

rows rotate faster than columns

See Also

row, col , expand.grid

Examples

Run this code
# NOT RUN {
  matcomb(1:3, 1:4)
  matcomb(2:3, 2:4)
# }

Run the code above in your browser using DataLab