[R] Spectral decomposition

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Mon Mar 11 15:30:57 CET 2002


"Marcos Sanches" <marcos_sanches at gallup.com> writes:

> 	Hello all,
> 
>     I have the square symetric matrix A:
> 2 1 1
> 1 2 1
> 1 1 2
>   My first question is what is the easiest way to enter this matriz in R?

Depends on the generality you need in the solution. 

m <- 1+diag(3) is probably the shortest. 

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list