[Robast-commits] r1114 - branches/robast-1.2/pkg/RobLox/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Aug 10 01:51:28 CEST 2018


Author: ruckdeschel
Date: 2018-08-10 01:51:27 +0200 (Fri, 10 Aug 2018)
New Revision: 1114

Modified:
   branches/robast-1.2/pkg/RobLox/R/rlOptIC.R
   branches/robast-1.2/pkg/RobLox/R/rlsOptIC_AL.R
   branches/robast-1.2/pkg/RobLox/R/roblox.R
   branches/robast-1.2/pkg/RobLox/R/rsOptIC.R
Log:
[RobLox] branch 2.8: 
+ the modifyIC functions gain argument withMakeIC to be consistent with the signature in RobAStBase
  (the arg is ignored in the RobLox Code)
+ The warnings as to moved ICs have been condensed

Modified: branches/robast-1.2/pkg/RobLox/R/rlOptIC.R
===================================================================
--- branches/robast-1.2/pkg/RobLox/R/rlOptIC.R	2018-08-09 23:48:36 UTC (rev 1113)
+++ branches/robast-1.2/pkg/RobLox/R/rlOptIC.R	2018-08-09 23:51:27 UTC (rev 1114)
@@ -18,7 +18,7 @@
                                biastype = symmetricBias(), 
                                normW = NormType())
 
-        modIC <- function(L2Fam, IC){
+        modIC <- function(L2Fam, IC, withMakeIC){
             if(is(L2Fam, "L2LocationFamily") && is(distribution(L2Fam), "Norm")){
                 CallL2Fam(IC) <- L2Fam at fam.call
                 return(IC)

Modified: branches/robast-1.2/pkg/RobLox/R/rlsOptIC_AL.R
===================================================================
--- branches/robast-1.2/pkg/RobLox/R/rlsOptIC_AL.R	2018-08-09 23:48:36 UTC (rev 1113)
+++ branches/robast-1.2/pkg/RobLox/R/rlsOptIC_AL.R	2018-08-09 23:51:27 UTC (rev 1114)
@@ -157,7 +157,7 @@
                                biastype = symmetricBias(), 
                                normW = NormType())
 
-        modIC <- function(L2Fam, IC){
+        modIC <- function(L2Fam, IC, withMakeIC){
             ICL2Fam <- eval(CallL2Fam(IC))
             if(is(L2Fam, "L2LocationScaleFamily") && is(distribution(L2Fam), "Norm")){
                 sdneu <- main(L2Fam)[2]
@@ -185,8 +185,10 @@
                             modifyIC = modifyIC(IC))
                 IC <- generateIC(neighbor = ContNeighborhood(radius = r),
                                  L2Fam = L2Fam, res = res)
-                addInfo(IC) <- c("modifyIC", "The IC has been modified")
-                addInfo(IC) <- c("modifyIC", "The entries in 'Infos' may be wrong")
+                if(!any(grepl("Some entries in 'Infos' may be wrong", Infos(IC)[,2]))){
+                    addInfo(IC) <- c("modifyIC", "The IC has been modified")
+                    addInfo(IC) <- c("modifyIC", "Some entries in 'Infos' may be wrong")
+                }
                 return(IC)
             }else{
                 makeIC(IC, L2Fam)

Modified: branches/robast-1.2/pkg/RobLox/R/roblox.R
===================================================================
--- branches/robast-1.2/pkg/RobLox/R/roblox.R	2018-08-09 23:48:36 UTC (rev 1113)
+++ branches/robast-1.2/pkg/RobLox/R/roblox.R	2018-08-09 23:51:27 UTC (rev 1114)
@@ -362,7 +362,7 @@
                                        biastype = symmetricBias(), 
                                        normW = NormType())
                 mse <- robEst$A1 + robEst$A2
-                modIC <- function(L2Fam, IC){
+                modIC <- function(L2Fam, IC, withMakeIC){
                     ICL2Fam <- eval(CallL2Fam(IC))
                     if(is(L2Fam, "L2LocationScaleFamily") && is(distribution(L2Fam), "Norm")){
                         sdneu <- main(L2Fam)[2]
@@ -391,8 +391,10 @@
                                     modifyIC = modifyIC(IC))
                         IC <- generateIC(neighbor = ContNeighborhood(radius = r),
                                         L2Fam = L2Fam, res = res)
-                        addInfo(IC) <- c("modifyIC", "The IC has been modified")
-                        addInfo(IC) <- c("modifyIC", "The entries in 'Infos' may be wrong")
+                        if(!any(grepl("Some entries in 'Infos' may be wrong", Infos(IC)[,2]))){
+                           addInfo(IC) <- c("modifyIC", "The IC has been modified")
+                           addInfo(IC) <- c("modifyIC", "Some entries in 'Infos' may be wrong")
+                        }
                         return(IC)
                     }else{
                         makeIC(L2Fam, IC)
@@ -489,7 +491,7 @@
                                        biastype = symmetricBias(), 
                                        normW = NormType())
                 mse <- robEst$A1 + robEst$A2
-                modIC <- function(L2Fam, IC){
+                modIC <- function(L2Fam, IC, withMakeIC){
                     ICL2Fam <- eval(CallL2Fam(IC))
                     if(is(L2Fam, "L2LocationScaleFamily") && is(distribution(L2Fam), "Norm")){
                         sdneu <- main(L2Fam)[2]
@@ -518,8 +520,10 @@
                                     modifyIC = modifyIC(IC))
                         IC <- generateIC(neighbor = ContNeighborhood(radius = r),
                                         L2Fam = L2Fam, res = res)
-                        addInfo(IC) <- c("modifyIC", "The IC has been modified")
-                        addInfo(IC) <- c("modifyIC", "The entries in 'Infos' may be wrong")
+                        if(!any(grepl("Some entries in 'Infos' may be wrong", Infos(IC)[,2]))){
+                           addInfo(IC) <- c("modifyIC", "The IC has been modified")
+                           addInfo(IC) <- c("modifyIC", "Some entries in 'Infos' may be wrong")
+                        }
                         return(IC)
                     }else{
                         makeIC(L2Fam, IC)
@@ -597,7 +601,7 @@
                     weight(w) <- getweight(w, neighbor = ContNeighborhood(radius = r), 
                                            biastype = symmetricBias(), 
                                            normW = NormType())
-                    modIC <- function(L2Fam, IC){
+                    modIC <- function(L2Fam, IC, withMakeIC){
                         if(is(L2Fam, "L2LocationFamily") && is(distribution(L2Fam), "Norm")){
                             CallL2New <- call("NormLocationFamily", 
                                               mean = main(L2Fam))
@@ -686,7 +690,7 @@
                     weight(w) <- getweight(w, neighbor = ContNeighborhood(radius = r), 
                                        biastype = symmetricBias(), 
                                        normW = NormType())
-                    modIC <- function(L2Fam, IC){
+                    modIC <- function(L2Fam, IC, withMakeIC){
                         if(is(L2Fam, "L2LocationFamily") && is(distribution(L2Fam), "Norm")){
                             CallL2New <- call("NormLocationFamily", 
                                               mean = main(L2Fam))
@@ -773,7 +777,7 @@
                     weight(w) <- getweight(w, neighbor = ContNeighborhood(radius = r), 
                                        biastype = symmetricBias(), 
                                        normW = NormType())
-                    modIC <- function(L2Fam, IC){
+                    modIC <- function(L2Fam, IC, withMakeIC){
                         ICL2Fam <- eval(CallL2Fam(IC))
                         if(is(L2Fam, "L2ScaleFamily") && is(distribution(L2Fam), "Norm")){
                             sdneu <- main(L2Fam)
@@ -795,8 +799,10 @@
                                         modifyIC = modifyIC(IC))
                             IC <- generateIC(neighbor = ContNeighborhood(radius = r),
                                             L2Fam = L2Fam, res = res)
-                            addInfo(IC) <- c("modifyIC", "The IC has been modified")
-                            addInfo(IC) <- c("modifyIC", "The entries in 'Infos' may be wrong")
+                            if(!any(grepl("Some entries in 'Infos' may be wrong", Infos(IC)[,2]))){
+                                addInfo(IC) <- c("modifyIC", "The IC has been modified")
+                                addInfo(IC) <- c("modifyIC", "Some entries in 'Infos' may be wrong")
+                            }
                             return(IC)
                         }else{
                             makeIC(L2Fam, IC)
@@ -884,7 +890,7 @@
                     weight(w) <- getweight(w, neighbor = ContNeighborhood(radius = r), 
                                        biastype = symmetricBias(), 
                                        normW = NormType())
-                    modIC <- function(L2Fam, IC){
+                    modIC <- function(L2Fam, IC, withMakeIC){
                         ICL2Fam <- eval(CallL2Fam(IC))
                         if(is(L2Fam, "L2ScaleFamily") && is(distribution(L2Fam), "Norm")){
                             sdneu <- main(L2Fam)
@@ -906,8 +912,10 @@
                                         modifyIC = modifyIC(IC))
                             IC <- generateIC(neighbor = ContNeighborhood(radius = r),
                                             L2Fam = L2Fam, res = res)
-                            addInfo(IC) <- c("modifyIC", "The IC has been modified")
-                            addInfo(IC) <- c("modifyIC", "The entries in 'Infos' may be wrong")
+                            if(!any(grepl("Some entries in 'Infos' may be wrong", Infos(IC)[,2]))){
+                               addInfo(IC) <- c("modifyIC", "The IC has been modified")
+                               addInfo(IC) <- c("modifyIC", "Some entries in 'Infos' may be wrong")
+                            }
                             return(IC)
                         }else{
                             makeIC(L2Fam, IC)

Modified: branches/robast-1.2/pkg/RobLox/R/rsOptIC.R
===================================================================
--- branches/robast-1.2/pkg/RobLox/R/rsOptIC.R	2018-08-09 23:48:36 UTC (rev 1113)
+++ branches/robast-1.2/pkg/RobLox/R/rsOptIC.R	2018-08-09 23:51:27 UTC (rev 1114)
@@ -70,7 +70,7 @@
                                biastype = symmetricBias(), 
                                normW = NormType())
 
-        modIC <- function(L2Fam, IC){
+        modIC <- function(L2Fam, IC, withMakeIC){
             ICL2Fam <- eval(CallL2Fam(IC))
             if(is(L2Fam, "L2ScaleFamily") && is(distribution(L2Fam), "Norm")){
                 sdneu <- main(L2Fam)
@@ -91,8 +91,10 @@
                             modifyIC = modifyIC(IC))
                 IC <- generateIC(neighbor = ContNeighborhood(radius = neighborRadius(IC)),
                                  L2Fam = L2Fam, res = res)
-                addInfo(IC) <- c("modifyIC", "The IC has been modified")
-                addInfo(IC) <- c("modifyIC", "The entries in 'Infos' may be wrong")
+                if(!any(grepl("Some entries in 'Infos' may be wrong", Infos(IC)[,2]))){
+                   addInfo(IC) <- c("modifyIC", "The IC has been modified")
+                   addInfo(IC) <- c("modifyIC", "Some entries in 'Infos' may be wrong")
+                }
                 return(IC)
             }else{
                 makeIC(IC, L2Fam)



More information about the Robast-commits mailing list