SCM

SCM Repository

[matrix] View of /pkg/R/pdmatrix.R
ViewVC logotype

View of /pkg/R/pdmatrix.R

Parent Directory Parent Directory | Revision Log Revision Log


Revision 593 - (download) (annotate)
Thu Mar 3 05:17:32 2005 UTC (14 years, 4 months ago) by bates
File size: 620 byte(s)
Remove pdfactor class
setAs("matrix", "pdmatrix",
      function(from) new("pdmatrix", from))

# setAs("pdfactor", "pdmatrix",
#       function(from) new("pdmatrix", crossprod(from)))

# setAs("pdmatrix", "pdfactor",
#       function(from) {
#           val <- new("pdfactor", .Call("nlme_Chol", from))
#           val@logDet <- sum(log(diag(val)))
#           val
#       },
#       function(from, value) {
#           as(from, "pdmatrix") <- crossprod(value)
#           from
#       })

setAs("pdmatrix", "corrmatrix",
      function(from) {
          ss = sqrt(diag(from))
          new("corrmatrix", t(from/ss)/ss, stdDev = ss)
      })

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business Powered By FusionForge