Diagonal: diag

11-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 April 13, 2025, 5:08 p.m.

Related to Diagonal in MPCR...