[R-SIG-Mac] problem with eigen() ??

Paul Rathouz prathouz at health.bsd.uchicago.edu
Fri Oct 17 17:12:22 MEST 2003


Hi All -- I am running a dual processor G4 with R v 1.6.2 for X11 which I
installed from fink.  Look what the eigen() function produces.  Am I
thinking about this wrong, or should  all of the eigen values be 1? -- pr

-----------------------------
> diag(rep(1,3))
     [,1] [,2] [,3]
[1,]    1    0    0
[2,]    0    1    0
[3,]    0    0    1
> diag(rep(1,4))
     [,1] [,2] [,3] [,4]
[1,]    1    0    0    0
[2,]    0    1    0    0
[3,]    0    0    1    0
[4,]    0    0    0    1
> diag(rep(1,5))
     [,1] [,2] [,3] [,4] [,5]
[1,]    1    0    0    0    0
[2,]    0    1    0    0    0
[3,]    0    0    1    0    0
[4,]    0    0    0    1    0
[5,]    0    0    0    0    1
>
> eigen(diag(rep(1,5)))$val
[1] 1 1 1 1 0
> eigen(diag(rep(1,14)))$val
 [1] 1 1 1 1 1 1 1 1 1 1 1 1 0 0
> eigen(diag(rep(1,15)))$val
 [1] 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0
> eigen(diag(rep(1,16)))$val
 [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
> eigen(diag(rep(1,17)))$val
 [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0
> eigen(diag(rep(1,20)))$val
 [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
> eigen(diag(rep(1,22)))$val
 [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0
>
> q("no")
-----------------------------

==========================================================================
Paul Rathouz, Asst. Professor        ph   773-834-1970
Dept. of Health Studies, Rm. W-264   fax  773-702-1979
University of Chicago                prathouz at health.bsd.uchicago.edu
5841 S. Maryland Ave. MC 2007
Chicago, IL  60637



More information about the R-SIG-Mac mailing list