SCM

SCM Repository

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

Diff of /pkg/Matrix/R/AllClass.R

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

revision 3202, Tue Jan 31 14:59:23 2017 UTC revision 3203, Tue Jan 31 15:46:36 2017 UTC
# Line 30  Line 30 
30               else .Call(dimNames_validate, object)               else .Call(dimNames_validate, object)
31           })           })
32    
33    if(FALSE)## Allowing 'Dimnames' to define 'Dim' --> would require changes in
34        ##  ../src/Mutils.c dimNames_validate() and how it is used in validity above
35    setMethod("initialize", "Matrix", function(.Object, ...)
36        {
37            .Object <- callNextMethod()
38            if(length(args <- list(...)) && any(nzchar(snames <- names(args))) && "Dimnames" %in% snames)
39            {
40                .Object@Dimnames <- DN <- .fixupDimnames(.Object@Dimnames)
41                if(is.na(match("Dim", snames)) && !any(vapply(DN, is.null, NA)))
42                    ## take 'Dim' from 'Dimnames' dimensions
43                    .Object@Dim <- lengths(DN, use.names=FALSE)
44            }
45            .Object
46        })
47    
48  if(getRversion() >= "3.2.0") {  if(getRversion() >= "3.2.0") {
49  setMethod("initialize", "Matrix", function(.Object, ...)  setMethod("initialize", "Matrix", function(.Object, ...)
50      {      {

Legend:
Removed from v.3202  
changed lines
  Added in v.3203

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