[Blotter-commits] r577 - pkg/FinancialInstrument/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Mar 15 15:31:04 CET 2011
Author: braverock
Date: 2011-03-15 15:31:03 +0100 (Tue, 15 Mar 2011)
New Revision: 577
Modified:
pkg/FinancialInstrument/R/instrument.R
Log:
- fix syntax error in is.list check
Modified: pkg/FinancialInstrument/R/instrument.R
===================================================================
--- pkg/FinancialInstrument/R/instrument.R 2011-03-15 13:52:54 UTC (rev 576)
+++ pkg/FinancialInstrument/R/instrument.R 2011-03-15 14:31:03 UTC (rev 577)
@@ -97,7 +97,9 @@
targ<-arg[['...']]
arg[['...']]<-NULL
arg<-c(arg,targ)
- }
+ }
+ }
+
#check for identifiers we recognize
ident_str<-c("X.RIC","RIC","CUSIP","SEDOL","OSI","Bloomberg","Reuters","ISIN","CQG","TT","Yahoo","Google")
for(i_s in ident_str ){
@@ -112,7 +114,7 @@
## TODO note that multiplier could be a time series, probably add code here to check
if(!is.numeric(multiplier) | length(multiplier) > 1) stop("multiplier must be a single number")
- if(!is.null(tick_size) && !is.numeric(tick_size) | length(tick_size) > 1) stop("tick_size must be NULL or a single number")
+ if(!is.null(tick_size) && (!is.numeric(tick_size) | length(tick_size) > 1)) stop("tick_size must be NULL or a single number")
if(is.null(type)) tclass="instrument" else tclass = c(type,"instrument")
More information about the Blotter-commits
mailing list