[Blotter-commits] r578 - pkg/FinancialInstrument/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Mar 15 19:16:37 CET 2011
Author: braverock
Date: 2011-03-15 19:16:37 +0100 (Tue, 15 Mar 2011)
New Revision: 578
Modified:
pkg/FinancialInstrument/R/load.instruments.R
Log:
- add additional if check to avoid extra work if use_identifier=='primary_id'
Modified: pkg/FinancialInstrument/R/load.instruments.R
===================================================================
--- pkg/FinancialInstrument/R/load.instruments.R 2011-03-15 14:31:03 UTC (rev 577)
+++ pkg/FinancialInstrument/R/load.instruments.R 2011-03-15 18:16:37 UTC (rev 578)
@@ -174,11 +174,13 @@
for (instr in instr_names){
if(!use_identifier=='primary_id'){
tmp_instr<-getInstrument(instr)
- instr_str<-make.names(tmp_instr$identifiers[[use_identifier]])
- if(!is.null(instr_str)) instr<-instr_str
- else {
- instr_str<-make.names(tmp_instr[[use_identifier]])
+ if(!use_identifier=='primary_id'){
+ instr_str<-make.names(tmp_instr$identifiers[[use_identifier]])
if(!is.null(instr_str)) instr<-instr_str
+ else {
+ instr_str<-make.names(tmp_instr[[use_identifier]])
+ if(!is.null(instr_str)) instr<-instr_str
+ }
}
}
symbol<-list()
More information about the Blotter-commits
mailing list