[Distr-commits] r879 - branches/distr-2.5/pkg/distr/R pkg/distr/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Feb 7 21:54:47 CET 2013


Author: ruckdeschel
Date: 2013-02-07 21:54:47 +0100 (Thu, 07 Feb 2013)
New Revision: 879

Modified:
   branches/distr-2.5/pkg/distr/R/makedots.R
   branches/distr-2.5/pkg/distr/R/plot-methods.R
   branches/distr-2.5/pkg/distr/R/plot-methods_LebDec.R
   pkg/distr/R/plot-methods.R
Log:
distr: fixed .makedotsPt -issue discovered by Gerald --> thx

Modified: branches/distr-2.5/pkg/distr/R/makedots.R
===================================================================
--- branches/distr-2.5/pkg/distr/R/makedots.R	2013-02-06 13:17:07 UTC (rev 878)
+++ branches/distr-2.5/pkg/distr/R/makedots.R	2013-02-07 20:54:47 UTC (rev 879)
@@ -15,3 +15,9 @@
     dots$lwd <- dots$lty <- NULL
     dots
 }
+.makedotsPt <- function(dots){
+    dots <- dots[names(dots) %in% c("bg", "lwd", "lty")]
+    dots["pch"] <- NULL
+    if (length(dots) == 0 ) dots <- NULL
+    dots
+}

Modified: branches/distr-2.5/pkg/distr/R/plot-methods.R
===================================================================
--- branches/distr-2.5/pkg/distr/R/plot-methods.R	2013-02-06 13:17:07 UTC (rev 878)
+++ branches/distr-2.5/pkg/distr/R/plot-methods.R	2013-02-07 20:54:47 UTC (rev 879)
@@ -33,7 +33,7 @@
      dots.for.points <- .makedotsPt(dots)
 
      dots.lowlevel <- .makedotsLowLevel(dots)
-     dots.without.pch <- dots.lowlevel[! (names(dots.lowlevel) %in% c("pch"))]
+     dots.without.pch <- dots.lowlevel[! (names(dots.lowlevel) %in% c("col", "pch"))]
      if(!is(x,"AbscontDistribution"))
          x <- .ULC.cast(x)     
      ###
@@ -361,8 +361,9 @@
       dots$ngrid <- NULL
 
       dots.for.points <- .makedotsPt(dots)
+      print(dots.for.points)
       dots.lowlevel <- .makedotsLowLevel(dots)
-      dots.without.pch <- dots.lowlevel[! (names(dots.lowlevel) %in% c("pch"))]
+      dots.without.pch <- dots.lowlevel[! (names(dots.lowlevel) %in% c("col", "pch"))]
       ###
      if(!is(x,"DiscreteDistribution"))
          x <- .ULC.cast(x)     
@@ -636,7 +637,7 @@
              col.main = col.inner)
 
        dots.without.pch0 <- dots.without.pch
-       dots.without.pch0 $col <- NULL
+       dots.without.pch0$col <- NULL
 
        do.call(lines, c(list(x = c(0,p(x)(supp[1])), y = rep(supp[1],2),  
                   col = col.vert), dots.without.pch0))           
@@ -650,7 +651,7 @@
         
        if(verticals && ngrid>1)
           {dots.without.pch0 <- dots.without.pch
-           dots.without.pch0 $col <- NULL
+           dots.without.pch0$col <- NULL
 
            do.call(lines, c(list(x = rep(p(x)(supp[1]),2), y = c(supp[1],supp[2]),  
                   col = col.vert), dots.without.pch0))

Modified: branches/distr-2.5/pkg/distr/R/plot-methods_LebDec.R
===================================================================
--- branches/distr-2.5/pkg/distr/R/plot-methods_LebDec.R	2013-02-06 13:17:07 UTC (rev 878)
+++ branches/distr-2.5/pkg/distr/R/plot-methods_LebDec.R	2013-02-07 20:54:47 UTC (rev 879)
@@ -128,7 +128,7 @@
       dots.for.points <- .makedotsPt(dots)
 
       dots.lowlevel <- .makedotsLowLevel(dots)
-      dots.without.pch <- dots.lowlevel[! (names(dots.lowlevel) %in% c("pch"))]
+      dots.without.pch <- dots.lowlevel[! (names(dots.lowlevel) %in% c("pch", "col"))]
       dots.for.lines <- .makedotsL(dots)
       dots.v <- dots.for.lines
       dots.v$col <- NULL

Modified: pkg/distr/R/plot-methods.R
===================================================================
--- pkg/distr/R/plot-methods.R	2013-02-06 13:17:07 UTC (rev 878)
+++ pkg/distr/R/plot-methods.R	2013-02-07 20:54:47 UTC (rev 879)
@@ -638,7 +638,7 @@
              col.main = col.inner)
 
        dots.without.pch0 <- dots.without.pch
-       dots.without.pch0 $col <- NULL
+       dots.without.pch0$col <- NULL
 
        do.call(lines, c(list(x = c(0,p(x)(supp[1])), y = rep(supp[1],2),  
                   col = col.vert), dots.without.pch0))           
@@ -652,7 +652,7 @@
         
        if(verticals && ngrid>1)
           {dots.without.pch0 <- dots.without.pch
-           dots.without.pch0 $col <- NULL
+           dots.without.pch0$col <- NULL
 
            do.call(lines, c(list(x = rep(p(x)(supp[1]),2), y = c(supp[1],supp[2]),  
                   col = col.vert), dots.without.pch0))



More information about the Distr-commits mailing list