powered by
create matrix indices from row and columns positions
matcomb(r, c)
a k by 2 matrix of matrix indices where k = length(r) * length(c)
k = length(r) * length(c)
integer vector of row positions
integer vector of column positions
Jens Oehlschlägel
rows rotate faster than columns
row, col , expand.grid
row
col
expand.grid
matcomb(1:3, 1:4) matcomb(2:3, 2:4)
Run the code above in your browser using DataLab