11-Diagonal | R Documentation |
Returns the diagonal of an MPCR matrix.
## S4 method for signature 'Rcpp_MPCR'
diag(x)
x |
An MPCR matrix. |
An MPCR vector contains the main diagonal of the matrix.
library(MPCR)
x <- as.MPCR(1:16,4,4,"single")
diag_vals <- diag(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.