[Blotter-commits] r1115 - pkg/quantstrat/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Aug 1 18:14:47 CEST 2012
Author: bodanker
Date: 2012-08-01 18:14:47 +0200 (Wed, 01 Aug 2012)
New Revision: 1115
Modified:
pkg/quantstrat/R/rules.R
Log:
- Reverse subsetting for timespan check in rules.R (speed improvement)
Modified: pkg/quantstrat/R/rules.R
===================================================================
--- pkg/quantstrat/R/rules.R 2012-08-01 14:25:11 UTC (rev 1114)
+++ pkg/quantstrat/R/rules.R 2012-08-01 16:14:47 UTC (rev 1115)
@@ -270,7 +270,7 @@
if(!isTRUE(rule$enabled)) next()
# check to see if we should run in this timespan
- if(!is.null(rule$timespan) && nrow(mktdata[rule$timespan][timestamp])==0) next()
+ if(!is.null(rule$timespan) && nrow(mktdata[timestamp][rule$timespan])==0) next()
# see 'S Programming' p. 67 for this matching
if(is.function(rule$name)) fun <- rule$name
More information about the Blotter-commits
mailing list