SCM

SCM Repository

[matrix] Diff of /pkg/R/dpoMatrix.R
ViewVC logotype

Diff of /pkg/R/dpoMatrix.R

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2004, Tue Jul 17 22:12:30 2007 UTC revision 2005, Wed Jul 18 14:46:20 2007 UTC
# Line 6  Line 6 
6  setAs("dpoMatrix", "corMatrix",  setAs("dpoMatrix", "corMatrix",
7        function(from) {        function(from) {
8            sd <- sqrt(diag(from))            sd <- sqrt(diag(from))
9            if (!is.null(nms <- from@Dimnames[[1]])) names(sd) <- nms            if(is.null(names(sd)) && !is.null(nms <- from@Dimnames[[1]]))
10            new("corMatrix", as(t(from/sd)/sd, "dpoMatrix"), sd = sd)                names(sd) <- nms
11              sd. <- sd; names(sd.) <- NULL
12              new("corMatrix", as(t(from/sd)/sd, "dpoMatrix"), sd = sd.)
13        })        })
14    
15  setAs("corMatrix", "lMatrix",  setAs("corMatrix", "lMatrix",

Legend:
Removed from v.2004  
changed lines
  Added in v.2005

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