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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Aug 24 06:22:02 CEST 2011


Author: gsee
Date: 2011-08-24 06:22:02 +0200 (Wed, 24 Aug 2011)
New Revision: 736

Modified:
   pkg/FinancialInstrument/R/parse_id.R
Log:
 bugfix for parse_id when root is supplied

Modified: pkg/FinancialInstrument/R/parse_id.R
===================================================================
--- pkg/FinancialInstrument/R/parse_id.R	2011-08-22 21:41:10 UTC (rev 735)
+++ pkg/FinancialInstrument/R/parse_id.R	2011-08-24 04:22:02 UTC (rev 736)
@@ -28,7 +28,7 @@
     sufftype <- TRUE #will we use the type given by parse_suffix, or overwrite it with e.g. 'exchange_rate'
     if (!is.null(root)) {
             suffix <- gsub(root,"",x) #turns ESU1 into U1, or ES_U11 into _U11 
-            suffix <- gsub("_","",x) #take out the underscore if there is one
+            suffix <- gsub("_","",suffix) #take out the underscore if there is one
     } else if (identical(integer(0), grep("[0-9]",x))) { 
         #if there are no numbers in the id, then it has no year, so it is not a recognized future or option
         root <- x



More information about the Blotter-commits mailing list