eigenvectors_byname | R Documentation |
Calculate the eigenvectors of a matrix or a list of matrices.
eigenvectors_byname(a)
a |
A matrix or list of matrices. |
This function pairs with eigenvalues_byname()
;
the first column of the resulting matrix is the eigenvector
for the first eigenvalue reported by eigenvalues_byname()
.
The second column of the resulting matrix is the eigenvector
for the second eigenvalue reported by eigenvalues_byname()
.
Etc.
Internally, this function uses base::eigen()
.
complete_rows_cols()
is called prior to calculating the eigenvectors.
A matrix whose columns are the eigenvectors of a
.
m <- matrix(c( 4, 6, 10,
3, 10, 13,
-2, -6, -8), byrow = TRUE, nrow = 3, ncol = 3,
dimnames = list(c("p1", "p2", "p3"), c("p1", "p2", "p3")))
m
eigenvectors_byname(m)
eigenvectors_byname(list(m, 2*m))
DF <- tibble::tibble(m_col = list(m, 2*m)) %>%
dplyr::mutate(
eigen_col = eigenvectors_byname(m_col)
)
DF$eigen_col[[1]]
DF$eigen_col[[2]]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.