Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

gsidiagGenerate

Internal functions: Generate a diagonal matrix


Description

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

Usage

gsi.diagGenerate(x)

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

Examples

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

compositions

Compositional Data Analysis

v2.0-1
GPL (>= 2)
Authors
K. Gerald van den Boogaart <boogaart@hzdr.de>, Raimon Tolosana-Delgado, Matevz Bren
Initial release
2021-01-08

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.