[Robast-commits] r759 - in branches/robast-1.0/pkg/RobAStBase: R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Jul 24 14:29:21 CEST 2014


Author: ruckdeschel
Date: 2014-07-24 14:29:21 +0200 (Thu, 24 Jul 2014)
New Revision: 759

Modified:
   branches/robast-1.0/pkg/RobAStBase/R/00internal.R
   branches/robast-1.0/pkg/RobAStBase/R/AllPlot.R
   branches/robast-1.0/pkg/RobAStBase/R/comparePlot.R
   branches/robast-1.0/pkg/RobAStBase/R/infoPlot.R
   branches/robast-1.0/pkg/RobAStBase/man/internal_plots.Rd
Log:
[RobAStBase] fixed a little bug with the use of .cexscale (with list of functions); .cexscale is now documented, and the argument of .fillList is now automatically cast to list (if necessary).

Modified: branches/robast-1.0/pkg/RobAStBase/R/00internal.R
===================================================================
--- branches/robast-1.0/pkg/RobAStBase/R/00internal.R	2014-07-24 11:42:34 UTC (rev 758)
+++ branches/robast-1.0/pkg/RobAStBase/R/00internal.R	2014-07-24 12:29:21 UTC (rev 759)
@@ -17,6 +17,7 @@
           {as.character(arg) %in% names(formals(fct))}
 
 .fillList <- function(list0, len = length(list0)){
+            if(!is.list(list0)) list0 <- list(list0)
             if(len == length(list0))
                return(list0)
             i <- 0

Modified: branches/robast-1.0/pkg/RobAStBase/R/AllPlot.R
===================================================================
--- branches/robast-1.0/pkg/RobAStBase/R/AllPlot.R	2014-07-24 11:42:34 UTC (rev 758)
+++ branches/robast-1.0/pkg/RobAStBase/R/AllPlot.R	2014-07-24 12:29:21 UTC (rev 759)
@@ -52,7 +52,7 @@
 
         if(!is.null(x.ticks)) dots$xaxt <- "n"
         if(!is.null(y.ticks)){
-           y.ticks <- .fillList(list(y.ticks), dims0)
+           y.ticks <- .fillList(y.ticks, dims0)
            dots$yaxt <- "n"
         }
 
@@ -195,7 +195,7 @@
         if(with.legend){
           fac.leg <- if(dims0>1) 3/4 else .75/.8
           if(missing(legend.location)){
-             legend.location <- .fillList(list("bottomright"), dims0)
+             legend.location <- .fillList("bottomright", dims0)
           }else{
              legend.location <- as.list(legend.location)
              legend.location <- .fillList(legend.location, dims0)

Modified: branches/robast-1.0/pkg/RobAStBase/R/comparePlot.R
===================================================================
--- branches/robast-1.0/pkg/RobAStBase/R/comparePlot.R	2014-07-24 11:42:34 UTC (rev 758)
+++ branches/robast-1.0/pkg/RobAStBase/R/comparePlot.R	2014-07-24 12:29:21 UTC (rev 759)
@@ -78,12 +78,12 @@
 
         if(!is.null(x.ticks)) dotsP$xaxt <- "n"
         if(!is.null(y.ticks)){
-           y.ticks <- .fillList(list(y.ticks), dims0)
+           y.ticks <- .fillList(y.ticks, dims0)
            dotsP$yaxt <- "n"
         }
 
         if(!is.null(cex.pts.fun)){
-           cex.pts.fun <- .fillList(list(cex.pts.fun), dims0*ncomp)
+           cex.pts.fun <- .fillList(cex.pts.fun, dims0*ncomp)
         }
 
 
@@ -410,3 +410,4 @@
                                      obj3=sel3$ind1, obj4=sel4$ind1))
         invisible()
     })
+

Modified: branches/robast-1.0/pkg/RobAStBase/R/infoPlot.R
===================================================================
--- branches/robast-1.0/pkg/RobAStBase/R/infoPlot.R	2014-07-24 11:42:34 UTC (rev 758)
+++ branches/robast-1.0/pkg/RobAStBase/R/infoPlot.R	2014-07-24 12:29:21 UTC (rev 759)
@@ -60,19 +60,19 @@
         in1to.draw <- (1%in%to.draw)
 
         if(!is.null(cex.pts.fun)){
-           cex.pts.fun <- .fillList(list(cex.pts.fun), (dims0+in1to.draw)*2)
+           cex.pts.fun <- .fillList(cex.pts.fun, (dims0+in1to.draw)*2)
         }
 
 
         if(!is.null(x.ticks)) dots$xaxt <- "n"
         if(!is.null(y.ticks)){
-           y.ticks <- .fillList(list(y.ticks), dims0+in1to.draw)
+           y.ticks <- .fillList(y.ticks, dims0+in1to.draw)
            dots$yaxt <- "n"
         }
 
         if(with.legend){
           if(missing(legend.location)){
-             legend.location <- .fillList(list("topright"), dims0+in1to.draw   )
+             legend.location <- .fillList("topright", dims0+in1to.draw   )
              if (in1to.draw) legend.location[[1]] <-  "bottomright"
           }else{
              legend.location <- as.list(legend.location)

Modified: branches/robast-1.0/pkg/RobAStBase/man/internal_plots.Rd
===================================================================
--- branches/robast-1.0/pkg/RobAStBase/man/internal_plots.Rd	2014-07-24 11:42:34 UTC (rev 758)
+++ branches/robast-1.0/pkg/RobAStBase/man/internal_plots.Rd	2014-07-24 12:29:21 UTC (rev 759)
@@ -6,6 +6,7 @@
 \alias{.SelectOrderData}
 \alias{.makedotsP}
 \alias{.makedotsLowLevel}
+\alias{.cexscale}
 
 \title{Internal / Helper functions of package RobAStBase for plot functions}
 
@@ -24,6 +25,7 @@
 .SelectOrderData(data, fct, which.lbs, which.Order)
 .makedotsP(dots)
 .makedotsLowLevel(dots)
+.cexscale(y, y1=y, maxcex=4,mincex=0.05,cex, fun=NULL)
 }
 \arguments{
   \item{scaleX}{logical; shall X-axis be rescaled (by default according to the cdf of
@@ -75,6 +77,12 @@
    \code{y.ticks} are both \code{NULL}, a respective box is drawn around the
    panel; otherwise no box is drawn in this case. }
   \item{dots}{a list; intended to be the \code{\dots} argument of \code{plot}. }
+  \item{y}{}
+  \item{y1}{}
+  \item{maxcex}{}
+  \item{mincex}{}
+  \item{cex}{}
+  \item{fun}{}
 }
 \details{
 \code{.rescalefct} rescales, if necessary, x and y axis for use in plot
@@ -118,7 +126,19 @@
 \code{.makedotsP} and \code{.makedotsLowLevel} manipulate the \code{\dots}
 argument, deleting certain items and selecting items which can be digested by
 \code{plot}, returning the manipulated list.
+
+\code{.cexscale}{rescales the point sizes of the points to be plotted;
+     the unscaled sizes are given in argument \code{y}, \code{y1} in
+     case of several lines of points to be plotted may contain the
+     vector of the sizes of all points to be plotted in (e.g., including
+     those of the other lines of points). \code{maxcex} and \code{mincex}
+     are maximum and minimum of the raw rescaled sizes; \code{cex} is
+     a factor drawn from argument \code{cex.pts} by which the raw sizes
+     are rescaled before being returned. \code{fun} is the function
+     by which the rescaling is done; by default this argument is \code{NULL}
+     and in this case the function \code{log(1+abs(x))} is used.
 }
+}
 
 
 \keyword{internal}



More information about the Robast-commits mailing list