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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Dec 22 19:44:10 CET 2010


Author: braverock
Date: 2010-12-22 19:44:09 +0100 (Wed, 22 Dec 2010)
New Revision: 508

Modified:
   pkg/FinancialInstrument/DESCRIPTION
   pkg/FinancialInstrument/NAMESPACE
   pkg/FinancialInstrument/R/instrument.R
   pkg/FinancialInstrument/R/load.instruments.R
Log:
- hash the .instrument env per input from Jeff Ryan
- use make.names consistently in steSymbolLookup.FI
- update NAMESPACE
- bump version

Modified: pkg/FinancialInstrument/DESCRIPTION
===================================================================
--- pkg/FinancialInstrument/DESCRIPTION	2010-12-22 18:11:51 UTC (rev 507)
+++ pkg/FinancialInstrument/DESCRIPTION	2010-12-22 18:44:09 UTC (rev 508)
@@ -1,17 +1,16 @@
 Package: FinancialInstrument
 Type: Package
 Title: Financial Instrument Model Infrastructure for R
-Version: 0.2.2
+Version: 0.3.0
 Date: $Date$
-Author: Peter Carl, Dirk Eddelbuettel, Jeffrey Ryan, Joshua Ulrich,
-    Brian G. Peterson
+Author: Peter Carl, Dirk Eddelbuettel, Jeffrey Ryan, Joshua Ulrich, Brian G. Peterson
 Maintainer: Peter Carl <peter at braverock.com>
-Description: Infrastructure for defining instruments meta-data and
-    relationships. Provides support for multi-asset class and
-    multi-currency portfolios.  Still in heavy development.
+Description: Infrastructure for defining instruments meta-data and relationships. Provides support for multi-asset class and multi-currency
+    portfolios.  Still in heavy development.
 URL: https://r-forge.r-project.org/projects/blotter/
 License: GPL
 LazyLoad: yes
 Depends: R (>= 2.11.1), xts, zoo
 Suggests: quantmod
 Copyright: (c) 2004 - 2010
+Collate: 'buildHierarchy.R' 'buildSpread.R' 'instrument.R' 'load.instruments.R' 'splice.R' 'splooth.R' 'synthetic.R' 'volep.R'

Modified: pkg/FinancialInstrument/NAMESPACE
===================================================================
--- pkg/FinancialInstrument/NAMESPACE	2010-12-22 18:11:51 UTC (rev 507)
+++ pkg/FinancialInstrument/NAMESPACE	2010-12-22 18:44:09 UTC (rev 508)
@@ -1,3 +1,4 @@
+export(buildHierarchy)
 export(buildSpread)
 export(is.instrument)
 export(instrument)
@@ -2,2 +3,3 @@
 export(stock)
+export(fund)
 export(future)
@@ -9,8 +11,8 @@
 export(currency)
 export(is.currency)
 export(exchange_rate)
-export(fund)
 export(bond)
+export(bond_series)
 export(getInstrument)
 export(load.instruments)
 export(setSymbolLookup.FI)

Modified: pkg/FinancialInstrument/R/instrument.R
===================================================================
--- pkg/FinancialInstrument/R/instrument.R	2010-12-22 18:11:51 UTC (rev 507)
+++ pkg/FinancialInstrument/R/instrument.R	2010-12-22 18:44:09 UTC (rev 508)
@@ -13,7 +13,7 @@
 
 .onLoad <- function(lib, pkg) {
     if(!exists('.instrument'))
-        .instrument <<- new.env()
+        .instrument <<- new.env(hash=TRUE)
 }
 
 #' class test for object supposedly of type 'instrument'

Modified: pkg/FinancialInstrument/R/load.instruments.R
===================================================================
--- pkg/FinancialInstrument/R/load.instruments.R	2010-12-22 18:11:51 UTC (rev 507)
+++ pkg/FinancialInstrument/R/load.instruments.R	2010-12-22 18:44:09 UTC (rev 508)
@@ -169,14 +169,14 @@
             instr_str<-make.names(tmp_instr$identifiers[[use_identifier]])
             if(!is.null(instr_str)) instr<-instr_str
             else {
-                instr_str<-tmp_instr[[use_identifier]]
+                instr_str<-make.names(tmp_instr[[use_identifier]])
                 if(!is.null(instr_str)) instr<-instr_str
             }
         }
         symbol<-list()
         symbol[[1]]<-params
         # construct $dir
-        symbol[[1]]$dir<-paste(base_dir,instr,sep=sepch)
+        symbol[[1]]$dir<-paste(base_dir,instr_str,sep=sepch)
         names(symbol)[1]<-instr
         new.symbols<-c(new.symbols,symbol)
     }



More information about the Blotter-commits mailing list