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

matcomb {ff} | R Documentation

## 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

### Details

rows rotate faster than columns

### Value

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

### Author(s)

Jens Oehlschlägel

### See Also

`row`, `col` , `expand.grid`

### Examples

      matcomb(1:3, 1:4)
      matcomb(2:3, 2:4)

[Package ff version 2.2-13 Index]