Eigenanalysis preserving dimnames
Compute eigenvalues and vectors, assigning names to the eigenvalues and dimnames to the eigenvectors.
a square matrix whose spectral decomposition is to be computed.
logical: If TRUE, the matrix is assumed to be symmetric (or Hermitian if complex) and only its lower triangle (diagonal included) is used. If 'symmetric' is not specified, the matrix is inspected for symmetry.
if 'TRUE', only the eigenvalues are computed and returned, otherwise both eigenvalues and eigenvectors are returned.
logical. Should EISPACK be used (for compatibility with R < 1.7.0)?
character vector of length nrow(x) or a character string that can be extended to that length by appening 1:nrow(x).
The default depends on symmetric and whether
1. Check 'symmetric'
2. ev <- eigen(x, symmetric, only.values = FALSE, EISPACK = FALSE);
eigen for more details.
3. rNames = rownames(x); if this is NULL, rNames = if(symmetric) paste('x', 1:nrow(x), sep=”) else paste('xcol', 1:nrow(x)).
4. Parse 'valuenames', assign to names(ev[['values']]).
5. dimnames(ev[['vectors']]) <- list(rNames, valuenames)
NOTE: This naming convention is fairly obvious if 'x' is symmetric. Otherwise, dimensional analysis suggests problems with almost any naming convention. To see this, consider the following simple example:
X <- matrix(1:4, 2, dimnames=list(LETTERS[1:2], letters[3:4]))
X.inv <- solve(X)
One way of interpreting this is to assume that colnames are really reciprocals of the units. Thus, in this example, X[1,1] is in units of 'A/c' and X.inv[1,1] is in units of 'c/A'. This would make any matrix with the same row and column names potentially dimensionless. Since eigenvalues are essentially the diagonal of a diagonal matrix, this would mean that eigenvalues are dimensionless, and their names are merely placeholders.
a list with components values and (if only.values = FALSE)
vectors, as described in
1 2 3 4 5 6 7 8 9 10 11