[Blotter-commits] r1022 - in pkg/FinancialInstrument: . R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri May 11 04:31:19 CEST 2012


Author: gsee
Date: 2012-05-11 04:31:18 +0200 (Fri, 11 May 2012)
New Revision: 1022

Modified:
   pkg/FinancialInstrument/DESCRIPTION
   pkg/FinancialInstrument/R/format_id.R
Log:
 use local variable inside for loop in prev.future_id

Modified: pkg/FinancialInstrument/DESCRIPTION
===================================================================
--- pkg/FinancialInstrument/DESCRIPTION	2012-05-08 21:17:49 UTC (rev 1021)
+++ pkg/FinancialInstrument/DESCRIPTION	2012-05-11 02:31:18 UTC (rev 1022)
@@ -11,7 +11,7 @@
     meta-data and relationships. Provides support for
     multi-asset class and multi-currency portfolios. Still
     in heavy development.
-Version: 0.14.3
+Version: 0.14.4
 URL: https://r-forge.r-project.org/projects/blotter/
 Date: $Date$
 Depends:

Modified: pkg/FinancialInstrument/R/format_id.R
===================================================================
--- pkg/FinancialInstrument/R/format_id.R	2012-05-08 21:17:49 UTC (rev 1021)
+++ pkg/FinancialInstrument/R/format_id.R	2012-05-11 02:31:18 UTC (rev 1022)
@@ -207,7 +207,7 @@
     out <- NULL    
     month_cycle <- month_cycle2numeric(month_cycle)
     for (ID in id) {
-        pid <- parse_id(id, silent=TRUE, root=root)
+        pid <- parse_id(ID, silent=TRUE, root=root)
         y <- pid$year
         curr.m <- match(pid$month, toupper(month.abb))    
 
@@ -224,7 +224,7 @@
 
         suffout <- paste(M2C()[prev.m], substr(y,3,4), sep="")
         #if there is no underscore in id and format==NULL sep="", else sep="_"    
-        if (identical(integer(0),grep("_",id))) {sep <- ""} else sep="_"
+        if (identical(integer(0),grep("_", ID))) {sep <- ""} else sep="_"
         if (is.null(format)) format <- pid$format
         suffout <- format_id(suffout, format, parse='suffix')
         out <- c(out, paste(pid$root, suffout, sep=sep))



More information about the Blotter-commits mailing list