Learn R Programming

statnet.common (version 4.13.0)

set_diag: 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).