Skip to contents

Generic function for extracting/constructing diagonal matrices.

Usage

diag(x = 1, nrow, ncol, names = TRUE)

Arguments

x

An object.

nrow, ncol

Optional dimensions for matrix construction.

names

Logical indicating whether to use names.