Calculate eigendecomposition and return ordered eigenvalues and eigenvectors

eigen2(spd, decreasing = FALSE)

Arguments

spd

a semi-positive definite matrix

decreasing

argument passed to order()

Value

a list with 2 components, the eigenvalues and the eigenvectors

Examples

readr::read_tsv(system.file("extdata", "mouse100.cXX.txt", package = "gemma2"), col_names = FALSE)[, 1:100] -> kinship
#> #> ── Column specification ──────────────────────────────────────────────────────── #> cols( #> .default = col_double(), #> X101 = col_logical() #> ) #> Use `spec()` for the full column specifications.
e_out <- eigen2(as.matrix(kinship))