[Distr-commits] r1101 - in pkg/distrEllipse: . R inst man tests/Examples

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Apr 23 17:39:49 CEST 2016


Author: ruckdeschel
Date: 2016-04-23 17:39:48 +0200 (Sat, 23 Apr 2016)
New Revision: 1101

Modified:
   pkg/distrEllipse/DESCRIPTION
   pkg/distrEllipse/NAMESPACE
   pkg/distrEllipse/R/AllGenerics.R
   pkg/distrEllipse/R/SphericalDistribution.R
   pkg/distrEllipse/inst/NEWS
   pkg/distrEllipse/man/SphericalDistribution-class.Rd
   pkg/distrEllipse/tests/Examples/distrEllipse-Ex.Rout.save
Log:
revised distrEllipse for S3 methods plot.Rd (and r.rd, d.rd, p.rd, q.rd) against S3 method dispatch clashes -> aliases plot.Rd (and rRd, dRd, pRd, qRd)

Modified: pkg/distrEllipse/DESCRIPTION
===================================================================
--- pkg/distrEllipse/DESCRIPTION	2016-04-23 15:34:52 UTC (rev 1100)
+++ pkg/distrEllipse/DESCRIPTION	2016-04-23 15:39:48 UTC (rev 1101)
@@ -1,5 +1,5 @@
 Package: distrEllipse
-Version: 2.6
+Version: 2.6.1
 Date: 2016-04-23
 Title: S4 Classes for Elliptically Contoured Distributions
 Description: Distribution (S4-)classes for elliptically contoured distributions (based on

Modified: pkg/distrEllipse/NAMESPACE
===================================================================
--- pkg/distrEllipse/NAMESPACE	2016-04-23 15:34:52 UTC (rev 1100)
+++ pkg/distrEllipse/NAMESPACE	2016-04-23 15:39:48 UTC (rev 1101)
@@ -21,6 +21,7 @@
 exportMethods("dimension", "radDistr", "scale", "location", "dim",
               "radDistr<-", "scale<-", "location<-",
               "plot.rd", "r.rd", "d.rd", "p.rd", "q.rd",
+              "plotRd", "rRd", "dRd", "pRd", "qRd",
               "E", "var", "mean", "sigma","mixCoeff", "mixDistr")
 exportMethods("plot", "show", "showobj", "Symmetry")
 exportMethods("+", "*", "%*%")

Modified: pkg/distrEllipse/R/AllGenerics.R
===================================================================
--- pkg/distrEllipse/R/AllGenerics.R	2016-04-23 15:34:52 UTC (rev 1100)
+++ pkg/distrEllipse/R/AllGenerics.R	2016-04-23 15:39:48 UTC (rev 1101)
@@ -24,3 +24,14 @@
    setGeneric("plot.rd", function(x, ...) standardGeneric("plot.rd"))
 
 
+if(!isGeneric("rRd")) 
+   setGeneric("rRd", function(object) standardGeneric("rRd"))
+if(!isGeneric("dRd")) 
+   setGeneric("dRd", function(object) standardGeneric("dRd"))
+if(!isGeneric("pRd")) 
+   setGeneric("pRd", function(object) standardGeneric("pRd"))
+if(!isGeneric("qRd")) 
+   setGeneric("qRd", function(object) standardGeneric("qRd"))
+if(!isGeneric("plotRd")) 
+   setGeneric("plotRd", function(x, ...) standardGeneric("plotRd"))
+

Modified: pkg/distrEllipse/R/SphericalDistribution.R
===================================================================
--- pkg/distrEllipse/R/SphericalDistribution.R	2016-04-23 15:34:52 UTC (rev 1100)
+++ pkg/distrEllipse/R/SphericalDistribution.R	2016-04-23 15:39:48 UTC (rev 1101)
@@ -49,6 +49,13 @@
 setMethod("p.rd", "SphericalDistribution", function(object) p(object at radDistr))
 setMethod("q.rd", "SphericalDistribution", function(object) q(object at radDistr))
 
+setMethod("plotRd", "SphericalDistribution",
+           function(x, ... ) plot(x at radDistr,...))
+setMethod("rRd", "SphericalDistribution", function(object) r(object at radDistr))
+setMethod("dRd", "SphericalDistribution", function(object) d(object at radDistr))
+setMethod("pRd", "SphericalDistribution", function(object) p(object at radDistr))
+setMethod("qRd", "SphericalDistribution", function(object) q(object at radDistr))
+
 ## functionals:
 
 setMethod("E", signature(object = "SphericalDistribution",

Modified: pkg/distrEllipse/inst/NEWS
===================================================================
--- pkg/distrEllipse/inst/NEWS	2016-04-23 15:34:52 UTC (rev 1100)
+++ pkg/distrEllipse/inst/NEWS	2016-04-23 15:39:48 UTC (rev 1101)
@@ -13,6 +13,8 @@
 
 user-visible CHANGES:
 + title changed to title style / capitalization
++ new synonyma plotRd, rRd, dRd, pRd, and qRd for  plot.rd, r.rd, d.rd, p.rd, and q.rd
+  to substitute the old ones on the long run (to avoid clashes with S3 inheritance)  
 
 under the hood:
 

Modified: pkg/distrEllipse/man/SphericalDistribution-class.Rd
===================================================================
--- pkg/distrEllipse/man/SphericalDistribution-class.Rd	2016-04-23 15:34:52 UTC (rev 1100)
+++ pkg/distrEllipse/man/SphericalDistribution-class.Rd	2016-04-23 15:39:48 UTC (rev 1101)
@@ -7,6 +7,11 @@
 \alias{dim,SphericalDistribution-method}
 \alias{radDistr,SphericalDistribution-method}
 \alias{radDistr<-,SphericalDistribution-method}
+\alias{plotRd,SphericalDistribution-method}
+\alias{rRd,SphericalDistribution-method}
+\alias{dRd,SphericalDistribution-method}
+\alias{pRd,SphericalDistribution-method}
+\alias{qRd,SphericalDistribution-method}
 \alias{plot.rd,SphericalDistribution-method}
 \alias{r.rd,SphericalDistribution-method}
 \alias{d.rd,SphericalDistribution-method}
@@ -19,6 +24,11 @@
 \alias{d.rd}
 \alias{p.rd}
 \alias{q.rd}
+\alias{plotRd}
+\alias{rRd}
+\alias{dRd}
+\alias{pRd}
+\alias{qRd}
 \alias{E,SphericalDistribution,missing,missing-method}
 \alias{var,SphericalDistribution-method}
 \alias{coerce,SphericalDistribution,EllipticalDistribution-method}
@@ -103,18 +113,26 @@
     \item{radDistr}{\code{signature(object = "SphericalDistribution")}: access method for
       slot \code{radDistr}. }
     \item{r.rd}{\code{signature(object = "SphericalDistribution")}: wrapped access method for
-      slot \code{r} of slot \code{radDistr}. }
+      slot \code{r} of slot \code{radDistr}. From version 2.6 on, an alias \code{rRd} is
+      introduced to replace \code{r.rd} on the long run in order to avoid clashes with
+      S3-method inheritance. }
     \item{d.rd}{\code{signature(object = "SphericalDistribution")}: wrapped access method for
-      slot \code{d} of slot \code{radDistr}. }
+      slot \code{d} of slot \code{radDistr}. From version 2.6 on, an alias \code{dRd} is
+      introduced to replace \code{d.rd} on the long run in order to avoid clashes with
+      S3-method inheritance. }
     \item{p.rd}{\code{signature(object = "SphericalDistribution")}: wrapped access method for
-      slot \code{p} of slot \code{radDistr}. }
+      slot \code{p} of slot \code{radDistr}. From version 2.6 on, an alias \code{pRd} is
+      introduced to replace \code{p.rd} on the long run in order to avoid clashes with
+      S3-method inheritance. }
     \item{q.rd}{\code{signature(object = "SphericalDistribution")}: wrapped access method for
-      slot \code{q} of slot \code{radDistr}. }
+      slot \code{q} of slot \code{radDistr}. From version 2.6 on, an alias \code{qRd} is
+      introduced to replace \code{q.rd} on the long run in order to avoid clashes with
+      S3-method inheritance. }
     \item{plot.rd}{\code{signature(x = "SphericalDistribution")}: utility; calls \code{plot}
-      for slot \code{radDistr}. }
+      for slot \code{radDistr}. From version 2.6 on, an alias \code{plotRd} is introduced 
+      to replace \code{plot.rd} on the long run in order to avoid clashes with S3-method inheritance.}
     \item{plot}{\code{signature(x = "SphericalDistribution", y = "missing")}:
-      plot for an spherically symmetric distribution; see \code{\link{plot-methods}}.
-    }
+      plot for an spherically symmetric distribution; see \code{\link{plot-methods}}. }
     \item{show}{\code{signature(object = "SphericalDistribution")}: 
       \code{show} method for spherically symmetric distributions.
     }

Modified: pkg/distrEllipse/tests/Examples/distrEllipse-Ex.Rout.save
===================================================================
--- pkg/distrEllipse/tests/Examples/distrEllipse-Ex.Rout.save	2016-04-23 15:34:52 UTC (rev 1100)
+++ pkg/distrEllipse/tests/Examples/distrEllipse-Ex.Rout.save	2016-04-23 15:39:48 UTC (rev 1101)
@@ -26,7 +26,7 @@
 Loading required package: setRNG
 Loading required package: distr
 Loading required package: startupmsg
-:startupmsg>  Utilities for Start-Up Messages (version 0.9.2)
+:startupmsg>  Utilities for Start-Up Messages (version 0.9.3)
 :startupmsg> 
 :startupmsg>  For more information see ?"startupmsg",
 :startupmsg>  NEWS("startupmsg")
@@ -35,7 +35,7 @@
 Loading required package: SweaveListingUtils
 :SweaveListingUtils>  Utilities for Sweave Together with
 :SweaveListingUtils>  TeX 'listings' Package (version
-:SweaveListingUtils>  0.7)
+:SweaveListingUtils>  0.7.3)
 :SweaveListingUtils> 
 :SweaveListingUtils>  NOTE: Support for this package
 :SweaveListingUtils>  will stop soon.
@@ -144,7 +144,7 @@
     rbind
 
 :distrEllipse>  S4 Classes for Elliptically Contoured
-:distrEllipse>  Distributions (version 2.6)
+:distrEllipse>  Distributions (version 2.6.1)
 :distrEllipse> 
 :distrEllipse>  Some functions from package 'stats' are
 :distrEllipse>  intentionally masked ---see
@@ -809,11 +809,13 @@
 > ###   dim,SphericalDistribution-method
 > ###   radDistr,SphericalDistribution-method
 > ###   radDistr<-,SphericalDistribution-method
-> ###   plot.rd,SphericalDistribution-method
+> ###   plotRd,SphericalDistribution-method rRd,SphericalDistribution-method
+> ###   dRd,SphericalDistribution-method pRd,SphericalDistribution-method
+> ###   qRd,SphericalDistribution-method plot.rd,SphericalDistribution-method
 > ###   r.rd,SphericalDistribution-method d.rd,SphericalDistribution-method
 > ###   p.rd,SphericalDistribution-method q.rd,SphericalDistribution-method
-> ###   radDistr radDistr<- plot.rd r.rd d.rd p.rd q.rd
-> ###   E,SphericalDistribution,missing,missing-method
+> ###   radDistr radDistr<- plot.rd r.rd d.rd p.rd q.rd plotRd rRd dRd pRd
+> ###   qRd E,SphericalDistribution,missing,missing-method
 > ###   var,SphericalDistribution-method
 > ###   coerce,SphericalDistribution,EllipticalDistribution-method
 > ###   show,SphericalDistribution-method
@@ -953,7 +955,7 @@
 > ###
 > options(digits = 7L)
 > base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
-Time elapsed:  5.11 0.17 5.28 NA NA 
+Time elapsed:  4.68 0.13 4.8 NA NA 
 > grDevices::dev.off()
 null device 
           1 



More information about the Distr-commits mailing list