[Blotter-commits] r939 - pkg/FinancialInstrument/inst/parser

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Feb 22 17:29:44 CET 2012


Author: gsee
Date: 2012-02-22 17:29:44 +0100 (Wed, 22 Feb 2012)
New Revision: 939

Modified:
   pkg/FinancialInstrument/inst/parser/TRTH_BackFill.R
Log:
 - assign .TRTH *after* it is modified. 
 - make sure doMC backend is registered after R restart

Modified: pkg/FinancialInstrument/inst/parser/TRTH_BackFill.R
===================================================================
--- pkg/FinancialInstrument/inst/parser/TRTH_BackFill.R	2012-02-22 16:00:24 UTC (rev 938)
+++ pkg/FinancialInstrument/inst/parser/TRTH_BackFill.R	2012-02-22 16:29:44 UTC (rev 939)
@@ -190,11 +190,11 @@
                  paste(.TRTH$path.output, "current.job.txt", sep=""), 
                  sep=""))
 
-    assign('.TRTH', .TRTH, pos=.GlobalEnv)
-
     .TRTH$tmp <- path.expand(paste(addslash(.TRTH$path.output), "tmp", sep=""))
     makeDir(.TRTH$tmp)
 
+    assign('.TRTH', .TRTH, pos=.GlobalEnv)
+
     if (Sys.getenv("TMPDIR") == "") {
         # Set the TMPDIR environment variable (requires restarting R)
         wd <- getwd()
@@ -210,6 +210,7 @@
         setwd(wd)
         require("FinancialInstrument")
         require("doMC")
+        registerDoMC(.TRTH$no.cores)
         .TRTH
         # All that just to change where the tempdir is created!!!!!!!
     }



More information about the Blotter-commits mailing list