Diagonal: diag

10-DiagonalR Documentation

diag

Description

Returns the diagonal of an MPCR matrix.

Usage

## S4 method for signature 'Rcpp_MPCR'
diag(x)

Arguments

x

An MPCR matrix.

Value

An MPCR vector contains the main diagonal of the matrix.

Examples

    library(MPCR)
    x <- as.MPCR(1:16,4,4,"single")
    diag_vals <- diag(x)


MPCR documentation built on Aug. 23, 2026, 5:10 p.m.

Related to Diagonal in MPCR...