getBandIdx {bnbc} | R Documentation

## Get Band Indices

### Description

Get the indices corresponding to a matrix band.

### Usage

    getBandIdx(n, band.no)

### Arguments

`n` | The number of rows/columns of a contact matrix
`band.no` | Integer specifying which matrix band. `band.no` = 1 retrieves the main diagonal.

### Details

This function is used in subsetting contact matrices, primarily in getBandMatrix. However, users wishing to extract band matrices directly may find this useful

### Value

A matrix with 2 columns and as many rows as entries in the matrix band.

### See Also

ContactGroup, getBandMatrix, band

### Examples

    data(cgEx)
    b2.idx <- getBandIdx(nrow(cgEx), 2)

[Package bnbc version 1.6.0 Index]