R/diagm.R
diagm.Rd
`diag` construct a diagnonal matrix.
diagm(x)
a vector or 1D array.
a matrix with `x` as diagonal and zero off-diagonal entries.