SCM

SCM Repository

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

Diff of /pkg/R/Auxiliaries.R

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

revision 1654, Fri Oct 27 16:58:15 2006 UTC revision 1659, Wed Nov 1 17:50:15 2006 UTC
# Line 634  Line 634 
634          Dimnames = x@Dimnames, uplo = x@uplo, diag = "N")          Dimnames = x@Dimnames, uplo = x@uplo, diag = "N")
635  }  }
636    
637  ## FIXME: this should probably be dropped / replaced by as_Csparse  ## Needed, e.g., in ./Csparse.R for colSums() etc:
638  .as.dgC.Fun <- function(x, na.rm = FALSE, dims = 1) {  .as.dgC.Fun <- function(x, na.rm = FALSE, dims = 1) {
639      x <- as(x, "dgCMatrix")      x <- as(x, "dgCMatrix")
640      callGeneric()      callGeneric()
641  }  }
642    
643    .as.dgC.0.factors <- function(x) {
644        if(!is(x, "dgCMatrix"))
645            as(x, "dgCMatrix") # will not have 'factors'
646        else ## dgCMatrix
647            if(!length(x@factors)) x else { x@factors <- list() ; x }
648    }
649    
650  .as.dgT.Fun <- function(x, na.rm = FALSE, dims = 1) {  .as.dgT.Fun <- function(x, na.rm = FALSE, dims = 1) {
651      ## used e.g. inside colSums() etc methods      ## used e.g. inside colSums() etc methods
652      x <- as(x, "dgTMatrix")      x <- as(x, "dgTMatrix")

Legend:
Removed from v.1654  
changed lines
  Added in v.1659

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