[Blotter-commits] r909 - in pkg/FinancialInstrument: . inst/parser
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Jan 10 20:21:27 CET 2012
Author: gsee
Date: 2012-01-10 20:21:27 +0100 (Tue, 10 Jan 2012)
New Revision: 909
Modified:
pkg/FinancialInstrument/DESCRIPTION
pkg/FinancialInstrument/inst/parser/TRTH_BackFill.R
Log:
if job.name has changed, update files.gz
Modified: pkg/FinancialInstrument/DESCRIPTION
===================================================================
--- pkg/FinancialInstrument/DESCRIPTION 2012-01-07 20:24:35 UTC (rev 908)
+++ pkg/FinancialInstrument/DESCRIPTION 2012-01-10 19:21:27 UTC (rev 909)
@@ -11,7 +11,7 @@
meta-data and relationships. Provides support for
multi-asset class and multi-currency portfolios. Still
in heavy development.
-Version: 0.10.3
+Version: 0.10.4
URL: https://r-forge.r-project.org/projects/blotter/
Date: $Date$
Depends:
Modified: pkg/FinancialInstrument/inst/parser/TRTH_BackFill.R
===================================================================
--- pkg/FinancialInstrument/inst/parser/TRTH_BackFill.R 2012-01-07 20:24:35 UTC (rev 908)
+++ pkg/FinancialInstrument/inst/parser/TRTH_BackFill.R 2012-01-10 19:21:27 UTC (rev 909)
@@ -67,6 +67,7 @@
#system.time(Out <- FEreut2xts(.TRTH)) # Convert to xts data: tick and second
#############################################################################################
+#TODO: if user changes the value of .TRTH$path.output, do we want to change the value of .TRTH$csv_dir, xts_dir, etc?
configureTRTH <- function(config.file, path.output='~/TRTH/', ...) {
## Create environment to hold variables that more than one function needs to access
@@ -274,7 +275,9 @@
.TRTH$path.output <- paste(.TRTH$path.output, "/", sep="")
}
- if (is.null(.TRTH$files.gz)) .TRTH$files.gz <- get_files.gz(.TRTH$archive_dir, .TRTH$job.name)
+ # get files.gz if it is NULL, or if the job.name was changed
+ if (is.null(.TRTH$files.gz) || identical(integer(0), grep(.TRTH$job.name, .TRTH$files.gz)))
+ .TRTH$files.gz <- get_files.gz(.TRTH$archive_dir, .TRTH$job.name)
if (is.null(.TRTH$instrument_file)) { #Don't need this anymore
tmp <- list.files(paste(.TRTH$path.output))
@@ -404,7 +407,7 @@
missing_i <- NULL
instr_s <- unique(files.xts[,'name.new'])
- alldefined <- c(ls_instruments(), ls_instruments_by('identifiers', NULL))
+ alldefined <- unique(c(ls_instruments(), ls_instruments_by("X.RIC", NULL, in.slot='identifiers')))
print(paste('Defining', length(instr_s[!instr_s %in% alldefined]), 'missing instruments'))
missing_list <- list() # list to hold auto-defined missing instruments
for(i in 1:length(instr_s)){
More information about the Blotter-commits
mailing list