[Distr-commits] r306 - branches/distr-2.1/pkg/distrMod/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Oct 11 01:24:48 CEST 2008


Author: ruckdeschel
Date: 2008-10-11 01:24:48 +0200 (Sat, 11 Oct 2008)
New Revision: 306

Modified:
   branches/distr-2.1/pkg/distrMod/R/AllPlot.R
Log:
forgot to update in branches/dist-2.1

Modified: branches/distr-2.1/pkg/distrMod/R/AllPlot.R
===================================================================
--- branches/distr-2.1/pkg/distrMod/R/AllPlot.R	2008-10-10 23:18:47 UTC (rev 305)
+++ branches/distr-2.1/pkg/distrMod/R/AllPlot.R	2008-10-10 23:24:48 UTC (rev 306)
@@ -12,6 +12,13 @@
         dots <- match.call(call = sys.call(sys.parent(1)), 
                        expand.dots = FALSE)$"..."
 
+        if(!is.null(dots[["lty"]]))  dots["lty"] <- NULL
+        if(!is.null(dots[["type"]])) dots["type"] <- NULL
+        if(!is.null(dots[["main"]])) dots["main"] <- NULL
+        if(!is.null(dots[["sub"]]))  dots["sub"] <- NULL
+        if(!is.null(dots[["xlab"]])) dots["xlab"] <- NULL
+        if(!is.null(dots[["ylab"]])) dots["ylab"] <- NULL
+
         e1 <- x at distribution
         if(!is(e1, "UnivariateDistribution")) stop("not yet implemented")
 
@@ -36,11 +43,6 @@
                 lty <- "dotted"
             }
         }
-
-        dots["lty"]  <- NULL
-        dots["type"] <- NULL
-        dots["xlab"] <- NULL
-        dots["ylab"] <- NULL
         
         dims <- length(x at param)
         L2deriv <- as(diag(dims) %*% x at L2deriv, "EuclRandVariable")
@@ -53,7 +55,7 @@
         ncols <- ceiling(dims/nrows)
         par(mfrow = c(nrows, ncols))
 
-        if(is.null(dots[["cex.main"]])) dots[["cex.main"]] <- 0.8
+        if(is.null(dots[["cex.main"]])) dots["cex.main"] <- 0.8
                 
         for(i in 1:dims){
             do.call(plot, args=c(list(x=x.vec, y=sapply(x.vec, L2deriv at Map[[i]]), 
@@ -63,7 +65,8 @@
                                  dots))
             if(is(e1, "DiscreteDistribution")){
                 x.vec1 <- seq(from = min(x.vec), to = max(x.vec), length = 1000)
-                lines(x.vec1, sapply(x.vec1, L2deriv at Map[[i]]), lty = "dotted")
+                do.call(lines, args=c(list(x.vec1, sapply(x.vec1, L2deriv at Map[[i]]), 
+                              lty = "dotted"),dots))
             }
             if(is.null(x at param@nuisance))
                 do.call(title, args = c(list(paste("Component", i, "of L_2 derivative\nof", name(x)[1], 



More information about the Distr-commits mailing list