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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Jan 12 19:13:25 CET 2010


Author: jryan
Date: 2010-01-12 19:13:25 +0100 (Tue, 12 Jan 2010)
New Revision: 144

Modified:
   pkg/blotter/R/calcEndEq.R
Log:
o  removed another Dates[grep and replaced with which.i=TRUE


Modified: pkg/blotter/R/calcEndEq.R
===================================================================
--- pkg/blotter/R/calcEndEq.R	2010-01-12 17:22:27 UTC (rev 143)
+++ pkg/blotter/R/calcEndEq.R	2010-01-12 18:13:25 UTC (rev 144)
@@ -11,8 +11,9 @@
     # Requires that updateAcct has been run and any additional functions
     # have alread appended information into that table (e.g., additions or
     # withdrawals, fees, interest, etc.)
-    Dates = time(Account[[1]])
-    PrevDate = Dates[grep(Date, Dates)-1]
+    # Dates = time(Account[[1]])
+    # PrevDate = Dates[grep(Date, Dates)-1]
+    PrevDate = time(Account[[1]][Account[[1]][Date,which.i=TRUE]-1])
     PrevEndEq = getEndEq(aname, PrevDate)
     Additions = as.numeric(Account[[1]][Date]$Additions)
     Withdrawals = as.numeric(Account[[1]][Date]$Withdrawals)



More information about the Blotter-commits mailing list