[Distr-commits] r176 - branches/distr-2.0/pkg/distrTeach/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Jun 6 14:28:03 CEST 2008


Author: stamats
Date: 2008-06-06 14:28:03 +0200 (Fri, 06 Jun 2008)
New Revision: 176

Modified:
   branches/distr-2.0/pkg/distrTeach/R/AllGeneric.R
   branches/distr-2.0/pkg/distrTeach/R/illustCLT.R
Log:
Corrected error - detected by setting environment variable _R_CHECK_CODOC_S4_METHODS_=true. Problem with "plotCLT" under 2.8.0.
Now distrTeach checks and installs without any warning or error under 2.7.0 (r45868) and 2.8.0 (r45868) also using environment variable _R_CHECK_CODOC_S4_METHODS_=true.

Modified: branches/distr-2.0/pkg/distrTeach/R/AllGeneric.R
===================================================================
--- branches/distr-2.0/pkg/distrTeach/R/AllGeneric.R	2008-06-06 12:06:44 UTC (rev 175)
+++ branches/distr-2.0/pkg/distrTeach/R/AllGeneric.R	2008-06-06 12:28:03 UTC (rev 176)
@@ -2,8 +2,13 @@
 # generics to  "usual"  methods
 ############################################################################
 
-if(!isGeneric("plotCLT")){
+#if(!isGeneric("plotCLT")){
   setGeneric("plotCLT", function(Tn, ...) standardGeneric("plotCLT"))
-}
+#}
 
-
+## The original code was not working under R 2.8.0 (r45868)
+## Error in setMethod("plotCLT", "DiscreteDistribution", function(Tn, k,  : 
+##  no existing definition for function "plotCLT"
+## Error: unable to load R code in package 'distrTeach'
+## Execution halted
+## ERROR: lazy loading failed for package 'distrTeach'

Modified: branches/distr-2.0/pkg/distrTeach/R/illustCLT.R
===================================================================
--- branches/distr-2.0/pkg/distrTeach/R/illustCLT.R	2008-06-06 12:06:44 UTC (rev 175)
+++ branches/distr-2.0/pkg/distrTeach/R/illustCLT.R	2008-06-06 12:28:03 UTC (rev 176)
@@ -35,8 +35,7 @@
 
               ## graphical output
 
-setMethod("plotCLT","DiscreteDistribution",
-          function(Tn,k, summands = "", withInner = TRUE) {
+setMethod("plotCLT","DiscreteDistribution", function(Tn, k, summands = "") {
                 N <- Norm()
                 supp <- support(Tn)
                 supp <- supp[supp >= -5]
@@ -87,8 +86,7 @@
                 par(mfrow = c(1,1), mar=oldmar)
        })
 
-setMethod("plotCLT","AbscontDistribution",
-          function(Tn,k, summands = "", withInner = TRUE) {
+setMethod("plotCLT","AbscontDistribution", function(Tn,k, summands = "") {
                 N <- Norm()
                 x <- seq(-5,5,0.01)
                 dTn <- d(Tn)(x)



More information about the Distr-commits mailing list