SCM

SCM Repository

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

Diff of /pkg/R/Matrix.R

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

revision 657, Wed Mar 16 16:57:52 2005 UTC revision 658, Thu Mar 17 17:52:06 2005 UTC
# Line 39  Line 39 
39  ## this may go away {since sparse matrices need something better!} :  ## this may go away {since sparse matrices need something better!} :
40  setMethod("show", signature(object = "Matrix"), prMatrix)  setMethod("show", signature(object = "Matrix"), prMatrix)
41    
42    ## Is this sufficient for all subclasses?
43    setMethod("as.matrix", signature(x = "Matrix"), function(x) as(x, "matrix"))
44    
45    
46  setMethod("dim", signature(x = "Matrix"),  setMethod("dim", signature(x = "Matrix"),
47            function(x) x@Dim, valueClass = "integer")            function(x) x@Dim, valueClass = "integer")
48  setMethod("dimnames", signature(x = "Matrix"), function(x) x@Dimnames)  setMethod("dimnames", signature(x = "Matrix"), function(x) x@Dimnames)
# Line 57  Line 61 
61  setMethod("dimnames<-", signature(x = "Matrix", value = "list"),  setMethod("dimnames<-", signature(x = "Matrix", value = "list"),
62            dimnamesGets)            dimnamesGets)
63    
64    setMethod("unname", signature("Matrix", force="missing"),
65              function(obj) { obj@Dimnames <- list(NULL,NULL); obj})
66    
67  Matrix <-  Matrix <-
68      function (data = NA, nrow = 1, ncol = 1, byrow = FALSE, dimnames = NULL)      function (data = NA, nrow = 1, ncol = 1, byrow = FALSE, dimnames = NULL)

Legend:
Removed from v.657  
changed lines
  Added in v.658

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