SCM

SCM Repository

[matrix] Diff of /pkg/Matrix/R/diagMatrix.R
ViewVC logotype

Diff of /pkg/Matrix/R/diagMatrix.R

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

revision 1109, Tue Jan 3 16:42:31 2006 UTC revision 1174, Mon Jan 16 20:03:48 2006 UTC
# Line 43  Line 43 
43                 nrow = n, ncol = n)                 nrow = n, ncol = n)
44        })        })
45    
46    setAs("diagonalMatrix", "generalMatrix",
47          function(from) {
48              x <- as(from, "matrix")
49              as(x,
50                 if(is.logical(x)) "lgeMatrix"
51    ## Not yet:
52    ##              else if(is.complex(x)) "zgeMatrix"
53    ##              else if(is.integer(x)) "igeMatrix"
54                 else "dgeMatrix")
55          })
56    
57    setAs("ddiMatrix", "dgeMatrix",
58          function(from) as(as(from, "matrix"), "dgeMatrix"))
59    
60    
61  setAs("matrix", "diagonalMatrix",  setAs("matrix", "diagonalMatrix",
62        function(from) {        function(from) {
63            d <- dim(from)            d <- dim(from)

Legend:
Removed from v.1109  
changed lines
  Added in v.1174

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