Skip to contents

Extract the diagonal of a pedmat object or other matrices. This generic function extending base::diag to support pedmat objects.

Usage

diag(x, ...)

Arguments

x

A matrix, vector, or pedmat object.

...

Additional arguments passed to base::diag.

Value

The diagonal vectors or a diagonal matrix.