gsidiagGenerate: Internal functions: Generate a diagonal matrix

Description Usage Arguments Details Value Note Author(s) See Also Examples

Description

Generate a diagonal matrix from a vector of the diagonal entries like.

Usage

1

Arguments

x

a vector

Details

The difference to original diag is that it always gives a diagonal matrix and does nothing flawed in case of a length one vector.

Value

a diagonal matrix.

Note

Do not use gsi.* functions directly since they are internal functions of the package

Author(s)

K.Gerald v.d. Boogaart http://www.stat.boogaart.de

See Also

gsi.diagExtract, diag

Examples

1
2
3
4
diag(1:3)
#gsi.diagGenerate(1:3)
#gsi.diagGenerate(3)
diag(3)

compositions documentation built on May 30, 2017, 3:25 a.m.