powered by
Returns a matrix of logicals the same size of a given matrix with entries 'TRUE' in the upper triangle close to the diagonal.
diag.ind(x, n = 1, diag = TRUE)
a matrix.
the number of elements from the diagonal to include.
logical. Should the diagonal be included?
Basic function useful for masking elements close to the diagonal of a given matrix.
Grant, B.J. et al. (2006) Bioinformatics 22, 2695--2696.
diag, lower.tri, upper.tri, matrix
diag
lower.tri
upper.tri
matrix
# NOT RUN { diag.ind( matrix(,ncol=5,nrow=5), n=3 ) # }
Run the code above in your browser using DataLab