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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Nov 12 15:56:21 CET 2014


Author: bodanker
Date: 2014-11-12 15:56:21 +0100 (Wed, 12 Nov 2014)
New Revision: 1647

Modified:
   pkg/blotter/R/updateAcct.R
Log:
- Fix #5983 typo/bug (not sure if this is a complete fix)


Modified: pkg/blotter/R/updateAcct.R
===================================================================
--- pkg/blotter/R/updateAcct.R	2014-11-07 20:50:11 UTC (rev 1646)
+++ pkg/blotter/R/updateAcct.R	2014-11-12 14:56:21 UTC (rev 1647)
@@ -122,7 +122,7 @@
               result = if(on=="none")
                 as.xts(sum(Account$Withdrawals[paste("::",obsDates, sep="")]), order.by=index(table))
               else{
-                if(length(Account$Additions[obsDates])>0) # catch empty sets
+                if(length(Account$Withdrawals[obsDates])>0) # catch empty sets
                   period.apply(Account$Withdrawals[obsDates], endpoints(Account$Withdrawals[obsDates], on=periodicity(table)$units), sum)
                 else
                   xts(rep(0,obsLength),order.by=obsDates)
@@ -132,7 +132,7 @@
               result = if(on=="none")
                 as.xts(sum(Account$Interest[paste("::",obsDates, sep="")]),, order.by=index(table))
               else{
-                if(length(Account$Additions[obsDates])>0) # catch empty sets
+                if(length(Account$Interest[obsDates])>0) # catch empty sets
                   period.apply(Account$Interest[obsDates], endpoints(Account$Interest[obsDates], on=periodicity(table)$units), sum)
                 else
                   xts(rep(0,obsLength),order.by=obsDates)



More information about the Blotter-commits mailing list