[Blotter-commits] r580 - pkg/FinancialInstrument/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Mar 15 19:33:11 CET 2011


Author: braverock
Date: 2011-03-15 19:33:11 +0100 (Tue, 15 Mar 2011)
New Revision: 580

Modified:
   pkg/FinancialInstrument/R/load.instruments.R
Log:
- one more time

Modified: pkg/FinancialInstrument/R/load.instruments.R
===================================================================
--- pkg/FinancialInstrument/R/load.instruments.R	2011-03-15 18:28:52 UTC (rev 579)
+++ pkg/FinancialInstrument/R/load.instruments.R	2011-03-15 18:33:11 UTC (rev 580)
@@ -174,16 +174,14 @@
     for (instr in instr_names){
         if(!use_identifier=='primary_id'){
             tmp_instr<-getInstrument(instr)
-            if(!use_identifier=='primary_id'){
-                instr_str<-make.names(tmp_instr$identifiers[[use_identifier]])
+            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<-make.names(tmp_instr[[use_identifier]])
-                    if(!is.null(instr_str)) instr<-instr_str
-                }                
-            } else {
-                instr_str <- instr
-            }
+            }                
+        } else {
+            instr_str <- instr
         }
         symbol<-list()
         symbol[[1]]<-params



More information about the Blotter-commits mailing list