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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Dec 4 22:25:49 CET 2010


Author: braverock
Date: 2010-12-04 22:25:49 +0100 (Sat, 04 Dec 2010)
New Revision: 484

Modified:
   pkg/FinancialInstrument/R/load.instruments.R
Log:
- add more Reuters workarounds to load.instruments

Modified: pkg/FinancialInstrument/R/load.instruments.R
===================================================================
--- pkg/FinancialInstrument/R/load.instruments.R	2010-12-04 21:02:20 UTC (rev 483)
+++ pkg/FinancialInstrument/R/load.instruments.R	2010-12-04 21:25:49 UTC (rev 484)
@@ -91,6 +91,12 @@
             #do some name cleanup to make up for Reuters silliness
             if(substr(arg$primary_id,1,1)==1) arg$primary_id <- substr(arg$primary_id,2,nchar(arg$primary_id))
             arg$primary_id<-make.names(arg$primary_id)
+            if(!is.null(arg$X.RIC)){
+                if(substr(arg$X.RIC,1,1)==1) arg$X.RIC <- substr(arg$X.RIC,2,nchar(arg$X.RIC))
+            }            
+            if(!is.null(arg$RIC)){
+                if(substr(arg$RIC,1,1)==1) arg$RIC <- substr(arg$RIC,2,nchar(arg$RIC))
+            }            
             
             if(is.function(try(match.fun(type)))){
                 out <- try(do.call(type,arg))



More information about the Blotter-commits mailing list