getBandIdx: Get Band Indices

Description Usage Arguments Details Value See Also Examples

View source: R/contactGroup_utils.R

Description

Get the indices corresponding to a matrix band.

Usage

1
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

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

bnbc documentation built on Nov. 1, 2018, 2:37 a.m.