[Blotter-commits] r838 - pkg/FinancialInstrument/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Nov 6 13:24:42 CET 2011
Author: braverock
Date: 2011-11-06 13:24:42 +0100 (Sun, 06 Nov 2011)
New Revision: 838
Modified:
pkg/FinancialInstrument/R/instrument.R
Log:
- add make.names support on identifiers to broaden the search in case an identifier has already been processed by R
Modified: pkg/FinancialInstrument/R/instrument.R
===================================================================
--- pkg/FinancialInstrument/R/instrument.R 2011-11-06 00:53:52 UTC (rev 837)
+++ pkg/FinancialInstrument/R/instrument.R 2011-11-06 12:24:42 UTC (rev 838)
@@ -839,7 +839,8 @@
instr_list<-ls(pos=.instrument)
for (instr in instr_list){
tmp_instr<-try(get(instr,pos=.instrument),silent=TRUE)
- if(inherits(tmp_instr, type) && !is.na(suppressWarnings(match(x, tmp_instr$identifiers)))) {
+ if(inherits(tmp_instr, type) &&
+ (!is.na(suppressWarnings(match(x, tmp_instr$identifiers) || !is.na(suppressWarnings(match(x, make.names(tmp_instr$identifiers)))))))) {
return(tmp_instr)
}
}
More information about the Blotter-commits
mailing list