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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Sep 7 21:24:22 CEST 2011


Author: gsee
Date: 2011-09-07 21:24:20 +0200 (Wed, 07 Sep 2011)
New Revision: 760

Modified:
   pkg/FinancialInstrument/R/format_id.R
Log:
rebuild using sep if format=NULL

Modified: pkg/FinancialInstrument/R/format_id.R
===================================================================
--- pkg/FinancialInstrument/R/format_id.R	2011-09-07 18:18:43 UTC (rev 759)
+++ pkg/FinancialInstrument/R/format_id.R	2011-09-07 19:24:20 UTC (rev 760)
@@ -60,9 +60,10 @@
                     ifelse(pid$format == "opt2", paste(pid$root, paste("20",suffix,sep=""), sep=sep), i)
                 }, 
                 i)
-            if (substr(tmp,1,1) == "_") tmp <- substr(tmp,2,nchar(tmp))
-            out <- c(out, tmp)
-		} else out <- c(out, i)
+		} else tmp <- paste(pid$root,suffix,sep=sep)
+        if (substr(tmp,1,1) == "_") tmp <- substr(tmp,2,nchar(tmp))
+        if (substr(tmp,nchar(tmp),nchar(tmp)) == "_") tmp <- substr(tmp,1,nchar(tmp)-1)
+        out <- c(out, tmp)
     }
     out
 }



More information about the Blotter-commits mailing list