as_diag | R Documentation |
Construct diagonal matrix from vector
as_diag(x)
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
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.