Skip to contents

Extract the diagonal of a pedmatrix object or other matrices. This generic function delegates to diag, Matrix::diag, or specialized S3 methods.

Usage

diag(x, ...)

Arguments

x

A matrix, vector, or pedmatrix object.

...

Additional arguments passed to methods.

Value

The diagonal vectors or a diagonal matrix.