[Distr-commits] r1064 - branches/distr-2.6/pkg/distrMod/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Nov 6 11:46:20 CET 2015


Author: ruckdeschel
Date: 2015-11-06 11:46:19 +0100 (Fri, 06 Nov 2015)
New Revision: 1064

Modified:
   branches/distr-2.6/pkg/distrMod/R/mleCalc-methods.R
Log:
assign statt <<- in mleCalc 

Modified: branches/distr-2.6/pkg/distrMod/R/mleCalc-methods.R
===================================================================
--- branches/distr-2.6/pkg/distrMod/R/mleCalc-methods.R	2015-11-06 10:36:46 UTC (rev 1063)
+++ branches/distr-2.6/pkg/distrMod/R/mleCalc-methods.R	2015-11-06 10:46:19 UTC (rev 1064)
@@ -104,7 +104,7 @@
         lnx <- length(nuisance(PFam))
         fixed <- fixed(PFam)
 
-       allwarns <<- character(0)
+       allwarns <- character(0)
        fun <- function(theta, Data, ParamFamily, criterionF, ...){
                vP <- TRUE
                if(validity.check) vP <- validParameter(ParamFamily, theta)
@@ -128,7 +128,8 @@
                                     paste(round(theta,3),collapse=","),
                                    " threw an error;\n",  "returning starting par;\n",
                                    sep="")
-                      allwarns <<- c(allwarns,warn0)
+                      assign("allwarns", envir=parent.env(), 
+                                  value=c(get("allwarns", envir=parent.env()),warn0))
                       warning(warn0)
                   }else{crit0 <- try(do.call(what = criterionF, args = argList),
                                      silent = TRUE)
@@ -138,7 +139,8 @@
                                     paste(round(theta,3),collapse=","),
                                    " threw an error;\n",  "returning starting par;\n",
                                    sep="")
-                         allwarns <<- c(allwarns,warn1)
+                         assign("allwarns", envir=parent.env(), 
+                                  value=c(get("allwarns", envir=parent.env()),warn1))
                          warning(warn1)
                          }
                   }



More information about the Distr-commits mailing list