[Robast-commits] r620 - in branches/robast-0.9/pkg: ROptEst/R RobAStBase/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Feb 24 00:15:26 CET 2013


Author: ruckdeschel
Date: 2013-02-24 00:15:26 +0100 (Sun, 24 Feb 2013)
New Revision: 620

Modified:
   branches/robast-0.9/pkg/ROptEst/R/getInfRobIC_asGRisk.R
   branches/robast-0.9/pkg/ROptEst/R/getInfRobIC_asHampel.R
   branches/robast-0.9/pkg/RobAStBase/R/InfluenceCurve.R
Log:
ROptEst and RobAStBase: some bug fixes (.evalListRec was not prepared for length 0, some substitute functions have not been passed as arguments...)

Modified: branches/robast-0.9/pkg/ROptEst/R/getInfRobIC_asGRisk.R
===================================================================
--- branches/robast-0.9/pkg/ROptEst/R/getInfRobIC_asGRisk.R	2013-02-23 22:44:11 UTC (rev 619)
+++ branches/robast-0.9/pkg/ROptEst/R/getInfRobIC_asGRisk.R	2013-02-23 23:15:26 UTC (rev 620)
@@ -445,8 +445,8 @@
                      sum(diag(std0%*%eval(Cov0))) + rad0^2 * b0^2}
 
         asMSE.0 <- substitute(do.call(ri.fct, args=list(std0=std1, Cov0=Cov1,
-                                    rad0 = rad1, b0=b1)), list(std1=std,
-                                    Cov1=Cov, rad1=radius, b1=b))
+                                    rad0 = rad1, b0=b1)), list(ri.fct = rifct,
+                                    std1=std, Cov1=Cov, rad1=radius, b1=b))
         if(!is(risk, "asMSE")){
                Risk <- substitute(do.call(getAsRisk, args =list(risk = risk0,
                           L2deriv = L2deriv0, neighbor = neighbor0,
@@ -465,7 +465,7 @@
 
         trAsCov.fct <- function(std0, Cov0) sum(diag(std0%*%eval(Cov0)))
         trAsCov <- substitute(do.call(tr.fct, args=list(std0=std1, Cov0=Cov1)),
-                              list(std1=std, Cov1=Cov))
+                              list(tr.fct = trAsCov.fct, std1=std, Cov1=Cov))
         Risk <- c(Risk, list(asCov = Cov,
                      asBias = list(value = b, biastype = biastype,
                                    normtype = normtype,

Modified: branches/robast-0.9/pkg/ROptEst/R/getInfRobIC_asHampel.R
===================================================================
--- branches/robast-0.9/pkg/ROptEst/R/getInfRobIC_asHampel.R	2013-02-23 22:44:11 UTC (rev 619)
+++ branches/robast-0.9/pkg/ROptEst/R/getInfRobIC_asHampel.R	2013-02-23 23:15:26 UTC (rev 620)
@@ -287,8 +287,9 @@
                      sum(diag(std0%*%eval(Cov0))) + rad0^2 * b0^2}
 
         asMSE.0 <- substitute(do.call(ri.fct, args=list(std0=std1, Cov0=Cov1,
-                                    rad0 = rad1, b0=b1)), list(std1=std,
-                                    Cov1=Cov, rad1=neighbor at radius, b1=b))
+                                    rad0 = rad1, b0=b1)), list(ri.fct = rifct,
+                                    std1=std, Cov1=Cov, rad1=neighbor at radius,
+                                    b1=b))
 
 
         ### add some further informations for the pIC-slots info and risk
@@ -296,7 +297,7 @@
 
         trAsCov.fct <- function(std0, Cov0) sum(diag(std0%*%eval(Cov0)))
         trAsCov <- substitute(do.call(tr.fct, args=list(std0=std1, Cov0=Cov1)),
-                              list(std1=std, Cov1=Cov))
+                              list(tr.fct = trAsCov.fct, std1=std, Cov1=Cov))
         r <- neighbor at radius
         Risk <- list(trAsCov = list(value = trAsCov,
                                     normtype = normtype),

Modified: branches/robast-0.9/pkg/RobAStBase/R/InfluenceCurve.R
===================================================================
--- branches/robast-0.9/pkg/RobAStBase/R/InfluenceCurve.R	2013-02-23 22:44:11 UTC (rev 619)
+++ branches/robast-0.9/pkg/RobAStBase/R/InfluenceCurve.R	2013-02-23 23:15:26 UTC (rev 620)
@@ -31,6 +31,7 @@
 ### helper function to recursively evaluate list
 .evalListRec <- function(list0){ ## a list
     len <- length(list0)
+    if(len==0L) return(list0)
     for(i in 1:len) {
         if(is.list(list0[[i]])){ list0[[i]] <- .evalListRec(list0[[i]])
            }else list0[[i]] <- eval(list0[[i]])



More information about the Robast-commits mailing list