[Blotter-commits] r350 - pkg/blotter/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Jul 13 17:45:59 CEST 2010
Author: braverock
Date: 2010-07-13 17:45:58 +0200 (Tue, 13 Jul 2010)
New Revision: 350
Modified:
pkg/blotter/R/updatePosPL.R
Log:
- add error check for multiple columns in Prices
- fix typo
Modified: pkg/blotter/R/updatePosPL.R
===================================================================
--- pkg/blotter/R/updatePosPL.R 2010-07-07 02:00:28 UTC (rev 349)
+++ pkg/blotter/R/updatePosPL.R 2010-07-13 15:45:58 UTC (rev 350)
@@ -22,6 +22,8 @@
Prices=getPrice(get(Symbol, envir=as.environment(.GlobalEnv)))
}
+ if(ncol(Prices)>1) Prices=getPrice(Prices,Symbol)
+
# freq = periodicity(Prices)
# switch(freq$scale,
@@ -36,7 +38,7 @@
Dates = time(Prices)
else if(!is.timeBased(Dates)) Dates = time(Prices[Dates])
- #TODO if ConMuilt is a time series, this won't work right
+ #TODO if ConMult is a time series, this won't work right
if(is.null(ConMult) | !hasArg(ConMult)){
tmp_instr<-try(getInstrument(Symbol))
if(inherits(tmp_instr,"try-error") | !is.instrument(tmp_instr)){
More information about the Blotter-commits
mailing list