[Blotter-commits] r1412 - pkg/quantstrat/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Mar 25 13:26:31 CET 2013


Author: bodanker
Date: 2013-03-25 13:26:31 +0100 (Mon, 25 Mar 2013)
New Revision: 1412

Modified:
   pkg/quantstrat/R/signals.R
Log:
- sigFormula now uses .xts constructor and as.list for speed


Modified: pkg/quantstrat/R/signals.R
===================================================================
--- pkg/quantstrat/R/signals.R	2013-03-24 19:21:24 UTC (rev 1411)
+++ pkg/quantstrat/R/signals.R	2013-03-25 12:26:31 UTC (rev 1412)
@@ -318,7 +318,7 @@
 	# Vijay's PAST/AAII/SIPRO example
 	# fieldVals <- try(eval(parse(text=expression), data))
 	ret_sig=NULL
-	ret_sig <- try(xts(eval(parse(text=formula), as.data.frame(data)),order.by=index(data)))
+	ret_sig <- try(.xts(eval(parse(text=formula), as.list(data)),order.by=.index(data)))
 	if(is.xts(ret_sig)){
 		if(isTRUE(cross)) ret_sig <- diff(ret_sig)==1
 		colnames(ret_sig)<-label



More information about the Blotter-commits mailing list