[Distr-commits] r211 - branches/distr-2.0/pkg/distrEx/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Jul 29 13:41:53 CEST 2008


Author: stamats
Date: 2008-07-29 13:41:53 +0200 (Tue, 29 Jul 2008)
New Revision: 211

Modified:
   branches/distr-2.0/pkg/distrEx/R/AllInitialize.R
Log:
minor bug corrected

Modified: branches/distr-2.0/pkg/distrEx/R/AllInitialize.R
===================================================================
--- branches/distr-2.0/pkg/distrEx/R/AllInitialize.R	2008-07-28 20:09:58 UTC (rev 210)
+++ branches/distr-2.0/pkg/distrEx/R/AllInitialize.R	2008-07-29 11:41:53 UTC (rev 211)
@@ -18,17 +18,17 @@
                         p0 <- p
                         p0[.isEqual01(p)] <- 0.5
                         q0 <- qgumbel(p0, loc = loc1, scale = scale1, ...)
-                        q0[.isEqual01(p)] <- sign([.isEqual01(p)]-0.5)*Inf
+                        q0[.isEqual01(p)] <- sign(p[.isEqual01(p)]-0.5)*Inf
                         return(q0)  
                      }
-        body(.Object at q) <- substitute({                         
+        body(.Object at q) <- substitute({
                               ## P.R.: changed to vectorized form 
                               p0 <- p
                               p0[.isEqual01(p)] <- 0.5
                               q0 <- qgumbel(p0, loc = loc1, 
                                             scale = scale1, ...)
-                              q0[.isEqual01(p)] <- sign([.isEqual01(p)]-0.5)*Inf
-                              return(q0)  
+                              q0[.isEqual01(p)] <- sign(p[.isEqual01(p)]-0.5)*Inf
+                              return(q0)
                                },
                               list(loc1 = loc, scale1 = scale))
         .Object at .withSim   <- FALSE



More information about the Distr-commits mailing list