View source: R/contactGroup_utils.R
band | R Documentation |
Get or set band from matrix.
band(mat, band.no)
band(mat, band.no) <- value
mat |
A matrix. |
band.no |
Integer specifying which matrix band. |
value |
A scalar or vector equal in length to the matrix band. |
A matrix band is the set of elements in a matrix from a specific off-diagonal.
A matrix band in the form of a vector.
getBandIdx
mat <- matrix(1:9, 3, 3)
band(mat, band.no = 2)
mat
band(mat, band.no = 2) <- c(9,10)
mat
data(cgEx)
tact.1 <- contacts(cgEx)[[1]]
b2 <- band(tact.1, 2)
band(tact.1, 2) <- b2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.