[Distr-commits] r1271 - in branches/distr-2.8/pkg/distr: R inst

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Aug 11 15:36:17 CEST 2018


Author: ruckdeschel
Date: 2018-08-11 15:36:17 +0200 (Sat, 11 Aug 2018)
New Revision: 1271

Modified:
   branches/distr-2.8/pkg/distr/R/DiscreteDistribution.R
   branches/distr-2.8/pkg/distr/R/UtilitiesDistributions.R
   branches/distr-2.8/pkg/distr/R/bAcDcLcDistribution.R
   branches/distr-2.8/pkg/distr/inst/NEWS
Log:
[distr] branch 2.8
+ fixed a (newly introduced) bug in exp() for DiscreteDistribution -- forgot to return obj ...
+ minor cleanups 

Modified: branches/distr-2.8/pkg/distr/R/DiscreteDistribution.R
===================================================================
--- branches/distr-2.8/pkg/distr/R/DiscreteDistribution.R	2018-08-10 22:45:52 UTC (rev 1270)
+++ branches/distr-2.8/pkg/distr/R/DiscreteDistribution.R	2018-08-11 13:36:17 UTC (rev 1271)
@@ -452,6 +452,7 @@
 setMethod("exp", "DiscreteDistribution",
            function(x){ obj <- .expm.d(x)
                         obj at .finSupport <- c(TRUE, x at .finSupport[2])
+                        obj 
            }
            )
 

Modified: branches/distr-2.8/pkg/distr/R/UtilitiesDistributions.R
===================================================================
--- branches/distr-2.8/pkg/distr/R/UtilitiesDistributions.R	2018-08-10 22:45:52 UTC (rev 1270)
+++ branches/distr-2.8/pkg/distr/R/UtilitiesDistributions.R	2018-08-11 13:36:17 UTC (rev 1271)
@@ -85,8 +85,8 @@
   rm(zz.T)
 
   f.d <- Dirac(0)
-  if(w.d)
-  {hasDis <- TRUE
+  if(w.d){
+   hasDis <- TRUE
    zz.nr <- zz[! zz %in% zz.replic]
    d.r <- zz.T1/sum(zz.T1)
    f.d <- DiscreteDistribution(supp = zz.replic, prob = d.r,

Modified: branches/distr-2.8/pkg/distr/R/bAcDcLcDistribution.R
===================================================================
--- branches/distr-2.8/pkg/distr/R/bAcDcLcDistribution.R	2018-08-10 22:45:52 UTC (rev 1270)
+++ branches/distr-2.8/pkg/distr/R/bAcDcLcDistribution.R	2018-08-11 13:36:17 UTC (rev 1271)
@@ -144,8 +144,8 @@
          dP <- discretePart(e2D)
          dP at .finSupport <- c(TRUE,TRUE) # as both pos&neg part are bounded away from 0
          discretePart(e2D) <- dP
-         ## obj at .finSupport <-
 
+
          if(getdistrOption("simplifyD"))
             e2D <- simplifyD(e2D)
 

Modified: branches/distr-2.8/pkg/distr/inst/NEWS
===================================================================
--- branches/distr-2.8/pkg/distr/inst/NEWS	2018-08-10 22:45:52 UTC (rev 1270)
+++ branches/distr-2.8/pkg/distr/inst/NEWS	2018-08-11 13:36:17 UTC (rev 1271)
@@ -28,6 +28,9 @@
   the upper bound is finite)
 + changed definition of q(DExp(..)) in initialize method in AllInitialize.R 
   from ifelse expressions to index operations  to avoid warnings 
+
+bug fixes
++ fixed a (newly introduced) bug in exp() for DiscreteDistribution -- forgot to return obj ...
   
 ##############
 v 2.7



More information about the Distr-commits mailing list