SCM

SCM Repository

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

Diff of /pkg/R/sparseMatrix.R

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

revision 2143, Tue Mar 18 21:46:41 2008 UTC revision 2144, Tue Mar 18 23:08:12 2008 UTC
# Line 511  Line 511 
511                as(r, "symmetricMatrix")                as(r, "symmetricMatrix")
512            })            })
513    
514    setMethod("is.na", signature(x = "sparseMatrix"),
515              function(x) {
516                  if(any((inax <- is.na(x@x)))) {
517                      r <- as(x, "lMatrix")# will be "lsparseMatrix" - *has* x slot
518                      r@x <- inax
519                      as(r, "nMatrix") # a 'pattern matrix
520                  } else {
521                      d <- x@Dim
522                      new("ngCMatrix", Dim = d, Dimnames = dimnames(x),
523                          i = integer(0), p = rep.int(0L, d[2]+1L))
524                  }
525              })
526    
527    
528  lm.fit.sparse <-  lm.fit.sparse <-

Legend:
Removed from v.2143  
changed lines
  Added in v.2144

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