set_diag: Return the matrix with diagonal set to a specified value

View source: R/matrix.utils.R

set_diagR Documentation

Return the matrix with diagonal set to a specified value

Description

This function simply assigns value to diagonal of x and returns x.

Usage

set_diag(x, value)

Arguments

x

a square matrix.

value

a value or a vector (recycled to the required length).


statnet/statnet.common documentation built on June 9, 2025, 2:34 a.m.