
Last chance! 50% off unlimited learning
Sale ends in
This function computes a limited number of eigenvalues and eigenvectors of a
matrix. It uses arpack
function from the
igraph package. If this package is not available, it will use
the standard eigen
function to do the calculation, but will
issue a warning.
eigs(
M,
nev = min(dim(M)[1] - 1, 1),
sym = sum(abs(M - t(M)))/sum(abs(M)) < 1e-10,
which = "LM",
use.arpack = TRUE,
options.arpack = NULL
)
a matrix.
number of eigenvalues and eigenvectors to return
A boolean indicating if matrix is symmetric or not. Defaults to checking if this is the case or not.
A character string indicating which eigenvalues to return.
Defaults to "LM", meaning largest magnitude eigenvalues. If not using
arpack
, then "SM" is also a possibility to return the
smallest magnitude eigenvalues. If using arpack
, then
a number of options are possible, though they are not all guaranteed to
work for all use cases. See that function for more details.
Additional options for arpack
.
See that function for details. Not all options are compatible with this
function.
A list with at least the following two items:
A set of eigenvalues
A matrix of eigenvectors
See also arpack