[Distr-commits] r1304 - branches/distr-2.9/pkg/distrEx/R branches/distr-2.9/pkg/distrEx/inst pkg/distrEx/R pkg/distrEx/inst pkg/distrEx/tests/Examples pkg/utils

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Mar 1 19:43:18 CET 2019


Author: ruckdeschel
Date: 2019-03-01 19:43:17 +0100 (Fri, 01 Mar 2019)
New Revision: 1304

Modified:
   branches/distr-2.9/pkg/distrEx/R/Expectation.R
   branches/distr-2.9/pkg/distrEx/inst/NEWS
   pkg/distrEx/R/Expectation.R
   pkg/distrEx/inst/NEWS
   pkg/distrEx/tests/Examples/distrEx-Ex_i386.Rout.save
   pkg/distrEx/tests/Examples/distrEx-Ex_x64.Rout.save
   pkg/utils/DESCRIPTIONutils.R
   pkg/utils/DESCRIPTIONutilsExamples.R
   pkg/utils/finde.R
Log:
[distrEx] trunk / branch 2.9 in expectation for signature(object = "...CondDistribution", fun = "function",  cond = "numeric"), we explicitely push through argument f1 through filtering
[utils] no longer uses branches 

Modified: branches/distr-2.9/pkg/distrEx/R/Expectation.R
===================================================================
--- branches/distr-2.9/pkg/distrEx/R/Expectation.R	2019-03-01 17:14:16 UTC (rev 1303)
+++ branches/distr-2.9/pkg/distrEx/R/Expectation.R	2019-03-01 18:43:17 UTC (rev 1304)
@@ -393,7 +393,11 @@
                          cond = "numeric"),
     function(object, fun, cond, withCond = FALSE, useApply = TRUE, 
              low = NULL, upp = NULL, Nsim = getdistrExOption("MCIterations"), ...){
-        dotsFun <- .filterFunargs(list(...), fun, neg=FALSE)
+
+        dots <- list(...)
+        dotsFun <- .filterFunargs(dots, fun, neg=FALSE)
+        if("f1"%in% names(dots)) dotsFun[["f1"]] <- dots[["f1"]]
+
         funwD <- function(x) do.call(fun,c(list(x),dotsFun))
         xsim <- r(object)(Nsim, cond)
         if(is.null(low)) low <- -Inf
@@ -423,8 +427,11 @@
              IQR.fac = getdistrExOption("IQR.fac"), ..., diagnostic = FALSE){
 
         mc <- match.call()
-        dotsFun <- .filterFunargs(list(...), fun, neg=FALSE)
 
+        dots <- list(...)
+        dotsFun <- .filterFunargs(dots, fun, neg=FALSE)
+        if("f1"%in% names(dots)) dotsFun[["f1"]] <- dots[["f1"]]
+
         CondArg <- if(withCond) list(cond=cond) else NULL
         funwD <- function(x) do.call(fun,c(list(x), CondArg,dotsFun))
 
@@ -460,7 +467,9 @@
                          cond = "numeric"),
     function(object, fun, cond, withCond = FALSE, useApply = TRUE, low = NULL, upp = NULL, ...){
 
-        dotsFun <- .filterFunargs(list(...), fun, neg=FALSE)
+        dots <- list(...)
+        dotsFun <- .filterFunargs(dots, fun, neg=FALSE)
+        if("f1"%in% names(dots)) dotsFun[["f1"]] <- dots[["f1"]]
 
         CondArg <- if(withCond) list(cond=cond) else NULL
         funwD <- function(x) do.call(fun,c(list(x), CondArg,dotsFun))

Modified: branches/distr-2.9/pkg/distrEx/inst/NEWS
===================================================================
--- branches/distr-2.9/pkg/distrEx/inst/NEWS	2019-03-01 17:14:16 UTC (rev 1303)
+++ branches/distr-2.9/pkg/distrEx/inst/NEWS	2019-03-01 18:43:17 UTC (rev 1304)
@@ -62,6 +62,9 @@
 		i.e., in case of random variables, argument "cond" is suitably attached 
 		to argument "x" of the Map of the random variable -- something like c(x,cond)
 		
+       in expectation for signature(object = "...Distribution", fun = "function",  
+	            cond = "numeric"), we explicitely push through argument f1 through filtering
+
 + .qtlIntegrate now uses smaller values for args subdivisions and order 
    in case partitioning into left/middle/right is used: they are multiplied
    by factors fac.L/fac.R/fac.M according to

Modified: pkg/distrEx/R/Expectation.R
===================================================================
--- pkg/distrEx/R/Expectation.R	2019-03-01 17:14:16 UTC (rev 1303)
+++ pkg/distrEx/R/Expectation.R	2019-03-01 18:43:17 UTC (rev 1304)
@@ -393,7 +393,11 @@
                          cond = "numeric"),
     function(object, fun, cond, withCond = FALSE, useApply = TRUE, 
              low = NULL, upp = NULL, Nsim = getdistrExOption("MCIterations"), ...){
-        dotsFun <- .filterFunargs(list(...), fun, neg=FALSE)
+
+        dots <- list(...)
+        dotsFun <- .filterFunargs(dots, fun, neg=FALSE)
+        if("f1"%in% names(dots)) dotsFun[["f1"]] <- dots[["f1"]]
+
         funwD <- function(x) do.call(fun,c(list(x),dotsFun))
         xsim <- r(object)(Nsim, cond)
         if(is.null(low)) low <- -Inf
@@ -423,8 +427,11 @@
              IQR.fac = getdistrExOption("IQR.fac"), ..., diagnostic = FALSE){
 
         mc <- match.call()
-        dotsFun <- .filterFunargs(list(...), fun, neg=FALSE)
 
+        dots <- list(...)
+        dotsFun <- .filterFunargs(dots, fun, neg=FALSE)
+        if("f1"%in% names(dots)) dotsFun[["f1"]] <- dots[["f1"]]
+
         CondArg <- if(withCond) list(cond=cond) else NULL
         funwD <- function(x) do.call(fun,c(list(x), CondArg,dotsFun))
 
@@ -460,7 +467,9 @@
                          cond = "numeric"),
     function(object, fun, cond, withCond = FALSE, useApply = TRUE, low = NULL, upp = NULL, ...){
 
-        dotsFun <- .filterFunargs(list(...), fun, neg=FALSE)
+        dots <- list(...)
+        dotsFun <- .filterFunargs(dots, fun, neg=FALSE)
+        if("f1"%in% names(dots)) dotsFun[["f1"]] <- dots[["f1"]]
 
         CondArg <- if(withCond) list(cond=cond) else NULL
         funwD <- function(x) do.call(fun,c(list(x), CondArg,dotsFun))

Modified: pkg/distrEx/inst/NEWS
===================================================================
--- pkg/distrEx/inst/NEWS	2019-03-01 17:14:16 UTC (rev 1303)
+++ pkg/distrEx/inst/NEWS	2019-03-01 18:43:17 UTC (rev 1304)
@@ -62,6 +62,9 @@
 		i.e., in case of random variables, argument "cond" is suitably attached 
 		to argument "x" of the Map of the random variable -- something like c(x,cond)
 		
+       in expectation for signature(object = "...Distribution", fun = "function",  
+	            cond = "numeric"), we explicitely push through argument f1 through filtering
+
 + .qtlIntegrate now uses smaller values for args subdivisions and order 
    in case partitioning into left/middle/right is used: they are multiplied
    by factors fac.L/fac.R/fac.M according to

Modified: pkg/distrEx/tests/Examples/distrEx-Ex_i386.Rout.save
===================================================================
--- pkg/distrEx/tests/Examples/distrEx-Ex_i386.Rout.save	2019-03-01 17:14:16 UTC (rev 1303)
+++ pkg/distrEx/tests/Examples/distrEx-Ex_i386.Rout.save	2019-03-01 18:43:17 UTC (rev 1304)
@@ -833,7 +833,7 @@
     }
     0 + cond %*% 1 + 1 * r(n, ...)
 }
-<environment: 0x060e4a50>
+<environment: 0x0622c9e0>
 > d(D1)
 function (x, cond, log = FALSE, ...) 
 {
@@ -855,7 +855,7 @@
     else d0 <- d0/1
     return(d0)
 }
-<environment: 0x060e4a50>
+<environment: 0x0622c9e0>
 > p(D1)
 function (q, cond, lower.tail = TRUE, log.p = FALSE, ...) 
 {
@@ -882,7 +882,7 @@
             p0 <- log(p0)
     return(p0)
 }
-<environment: 0x060e4a50>
+<environment: 0x0622c9e0>
 > q(D1)
 function (p, cond, lower.tail = TRUE, log.p = FALSE, ...) 
 {
@@ -906,7 +906,7 @@
         argList <- c(argList, dots)
     1 * do.call(q, argList) + 0 + as.vector(cond %*% 1)
 }
-<environment: 0x060e4a50>
+<environment: 0x0622c9e0>
 > ## in RStudio or Jupyter IRKernel, use q.l(.)(.) instead of q(.)(.)
 > param(D1)
 name:	parameter of a linear regression model
@@ -1630,7 +1630,7 @@
 > cleanEx()
 > options(digits = 7L)
 > base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
-Time elapsed:  14.47 0.42 17.47 NA NA 
+Time elapsed:  9.78 0.84 15.41 NA NA 
 > grDevices::dev.off()
 null device 
           1 

Modified: pkg/distrEx/tests/Examples/distrEx-Ex_x64.Rout.save
===================================================================
--- pkg/distrEx/tests/Examples/distrEx-Ex_x64.Rout.save	2019-03-01 17:14:16 UTC (rev 1303)
+++ pkg/distrEx/tests/Examples/distrEx-Ex_x64.Rout.save	2019-03-01 18:43:17 UTC (rev 1304)
@@ -833,7 +833,7 @@
     }
     0 + cond %*% 1 + 1 * r(n, ...)
 }
-<environment: 0x000000000ac31090>
+<environment: 0x000000000b437af8>
 > d(D1)
 function (x, cond, log = FALSE, ...) 
 {
@@ -855,7 +855,7 @@
     else d0 <- d0/1
     return(d0)
 }
-<environment: 0x000000000ac31090>
+<environment: 0x000000000b437af8>
 > p(D1)
 function (q, cond, lower.tail = TRUE, log.p = FALSE, ...) 
 {
@@ -882,7 +882,7 @@
             p0 <- log(p0)
     return(p0)
 }
-<environment: 0x000000000ac31090>
+<environment: 0x000000000b437af8>
 > q(D1)
 function (p, cond, lower.tail = TRUE, log.p = FALSE, ...) 
 {
@@ -906,7 +906,7 @@
         argList <- c(argList, dots)
     1 * do.call(q, argList) + 0 + as.vector(cond %*% 1)
 }
-<environment: 0x000000000ac31090>
+<environment: 0x000000000b437af8>
 > ## in RStudio or Jupyter IRKernel, use q.l(.)(.) instead of q(.)(.)
 > param(D1)
 name:	parameter of a linear regression model
@@ -1630,7 +1630,7 @@
 > cleanEx()
 > options(digits = 7L)
 > base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
-Time elapsed:  15.76 0.66 21.89 NA NA 
+Time elapsed:  10.74 0.39 12.53 NA NA 
 > grDevices::dev.off()
 null device 
           1 

Modified: pkg/utils/DESCRIPTIONutils.R
===================================================================
--- pkg/utils/DESCRIPTIONutils.R	2019-03-01 17:14:16 UTC (rev 1303)
+++ pkg/utils/DESCRIPTIONutils.R	2019-03-01 18:43:17 UTC (rev 1304)
@@ -3,7 +3,7 @@
 
    ## change svncheckout suitably...
    svncheckout <- file.path("C:/rtest/distr")
-   trunk <- FALSE
+   trunk <- TRUE
    ## if the version from devel
    branches <- dir(file.path(svncheckout,"branches"))
    branches <- grep("distr-",branches,value=TRUE)

Modified: pkg/utils/DESCRIPTIONutilsExamples.R
===================================================================
--- pkg/utils/DESCRIPTIONutilsExamples.R	2019-03-01 17:14:16 UTC (rev 1303)
+++ pkg/utils/DESCRIPTIONutilsExamples.R	2019-03-01 18:43:17 UTC (rev 1304)
@@ -148,7 +148,7 @@
           "distr", "distrEx", "distrDoc", "distrEllipse", "distrRmetrics",
           "distrMod", "distrTeach", "distrSim", "distrTEst")
 Names <- c("Version", "License")
-Values <- matrix(c("2.8.0","LGPL-3"),2,length(Pkgs))
+Values <- matrix(c("2.9.0","LGPL-3"),2,length(Pkgs))
 colnames(Values) <- Pkgs
 rownames(Values) <- Names
 Values["Version",1] <- "0.9.7"

Modified: pkg/utils/finde.R
===================================================================
--- pkg/utils/finde.R	2019-03-01 17:14:16 UTC (rev 1303)
+++ pkg/utils/finde.R	2019-03-01 18:43:17 UTC (rev 1304)
@@ -3,7 +3,7 @@
 
    ## change svncheckout suitably...
    svncheckout <- file.path("C:/rtest/distr")
-   trunk <- FALSE
+   trunk <- TRUE
    ## if the version from devel
    branches <- dir(file.path(svncheckout,"branches"))
    branches <- grep("distr-",branches,value=TRUE)



More information about the Distr-commits mailing list