[Blotter-commits] r455 - pkg/blotter/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Nov 17 04:24:29 CET 2010


Author: peter_carl
Date: 2010-11-17 04:24:29 +0100 (Wed, 17 Nov 2010)
New Revision: 455

Modified:
   pkg/blotter/R/updatePortf.R
Log:
- fixed error in date selection when passing in Dates


Modified: pkg/blotter/R/updatePortf.R
===================================================================
--- pkg/blotter/R/updatePortf.R	2010-11-17 03:21:13 UTC (rev 454)
+++ pkg/blotter/R/updatePortf.R	2010-11-17 03:24:29 UTC (rev 455)
@@ -75,7 +75,7 @@
 		else {summary=cbind(summary,result)}
     }
 	
-	if(!is.timeBased(Dates)) Dates = time(Portfolio$summary[Dates])
+	if(!is.timeBased(Dates)) Dates = time(Portfolio$symbols[[1]][Dates])
 	startDate = first(xts:::.parseISO8601(Dates))$first.time-1 #does this need to be a smaller delta for millisecond data?
 	# trim summary slot to not double count, related to bug 831 on R-Forge, and rbind new summary 
 	if(attr(Portfolio,'initDate')>=startDate | length(Portfolio$summary)==0){



More information about the Blotter-commits mailing list