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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Feb 22 17:00:25 CET 2012


Author: gsee
Date: 2012-02-22 17:00:24 +0100 (Wed, 22 Feb 2012)
New Revision: 938

Modified:
   pkg/FinancialInstrument/inst/parser/TRTH_BackFill.R
Log:
 - reload libraries after R restart.
 - do not allow splitCSV to run unless TMPDIR environment variable has been set.

Modified: pkg/FinancialInstrument/inst/parser/TRTH_BackFill.R
===================================================================
--- pkg/FinancialInstrument/inst/parser/TRTH_BackFill.R	2012-02-22 03:29:10 UTC (rev 937)
+++ pkg/FinancialInstrument/inst/parser/TRTH_BackFill.R	2012-02-22 16:00:24 UTC (rev 938)
@@ -208,6 +208,8 @@
         refresh()
         file.remove(".RData")
         setwd(wd)
+        require("FinancialInstrument")
+        require("doMC")
         .TRTH
         # All that just to change where the tempdir is created!!!!!!!
     }
@@ -331,7 +333,10 @@
 
 splitCSV <- function(.TRTH) {
     if (missing(.TRTH) && !exists(".TRTH")) stop("Run configureTRTH function first")
-    
+    if (Sys.getenv("TMPDIR") == "") {
+        stop(paste("TMPDIR environment variable must be set",  
+                   "either manually or by running configureTRTH"))
+    }
     # edit text file so others can see what job we're working on
     system(paste('echo "', Sys.time(), ' splitCSV job.name: ', .TRTH$job.name, '" > ', 
                  paste(.TRTH$path.output, "current.job.txt", sep=""), 



More information about the Blotter-commits mailing list