P. 1
An Introduction to R

# An Introduction to R

|Views: 55|Likes:
Intoducción a R
Intoducción a R

Published by: juanmcferrin on Feb 05, 2010

### Availability:

Read on Scribd mobile: iPhone, iPad and Android.
See more
See less

10/23/2011

pdf

text

original

The function eigen(Sm) calculates the eigenvalues and eigenvectors of a symmetric matrix
Sm. The result of this function is a list of two components named values and vectors.
The assignment

> ev <- eigen(Sm)

will assign this list to ev. Then ev\$val is the vector of eigenvalues of Sm and ev\$vec is the
matrix of corresponding eigenvectors. Had we only needed the eigenvalues we could have
used the assignment:

> evals <- eigen(Sm)\$values

evals now holds the vector of eigenvalues and the second component is discarded. If the
expression

> eigen(Sm)

is used by itself as a command the two components are printed, with their names. For large
matrices it is better to avoid computing the eigenvectors if they are not needed by using
the expression

> evals <- eigen(Sm, only.values = TRUE)\$values

scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->