powered by
Construct diagonal matrix from vector
as_diag(x)
Matrix with 1 row or 1 column that is the diagonal in a new diagonal matrix
if (has_sympy()) { d <- as_sym(c("a", "b", "c")) D <- as_diag(d) D }
Run the code above in your browser using DataLab