gsi.diagExtract | R Documentation |
Get the main diagonal of a matrix, even if the matrix is 1x1.
gsi.diagExtract(x)
x |
a matrix |
The difference to original diag
is that it always
gives the diagonal and does nothing flawed in case of a 1x1 matrix or
a single number considered as such matrix.
a vector containing the main diagonal entries of x.
Do not use gsi.* functions directly since they are internal functions of the package
K.Gerald v.d. Boogaart http://www.stat.boogaart.de
gsi.diagGenerate
, diag
#data(SimulatedAmounts)
#gsi.diagExtract(var(acomp(sa.lognormals,c(1,2))))
#gsi.diagExtract(var(ilr(acomp(sa.lognormals,c(1,2)))))
#gsi.diagExtract(var(ilt(aplus(sa.lognormals,c(1)))))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.