[Blotter-commits] r591 - pkg/FinancialInstrument/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sat Apr 9 12:48:54 CEST 2011
Author: braverock
Date: 2011-04-09 12:48:53 +0200 (Sat, 09 Apr 2011)
New Revision: 591
Modified:
pkg/FinancialInstrument/R/load.instruments.R
Log:
- clean up instrument lookup in load.instruments
Modified: pkg/FinancialInstrument/R/load.instruments.R
===================================================================
--- pkg/FinancialInstrument/R/load.instruments.R 2011-04-09 10:47:14 UTC (rev 590)
+++ pkg/FinancialInstrument/R/load.instruments.R 2011-04-09 10:48:53 UTC (rev 591)
@@ -172,17 +172,13 @@
ndc<-nchar(base_dir)
if(substr(base_dir,ndc,ndc)=='/') sepch='' else sepch='/'
for (instr in instr_names){
+ tmp_instr<-getInstrument(instr)
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(!is.null(instr_str)) instr<-instr_str
- }
} else {
- instr_str <- instr
- }
+ instr_str<-make.names(tmp_instr[[use_identifier]])
+ }
+ if(!is.null(instr_str)) instr<-instr_str
symbol<-list()
symbol[[1]]<-params
# construct $dir
More information about the Blotter-commits
mailing list