[Pnl-commits] r10 - pkg/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Dec 21 10:44:06 CET 2011
Author: mark
Date: 2011-12-21 10:44:05 +0100 (Wed, 21 Dec 2011)
New Revision: 10
Modified:
pkg/R/calcDvd.R
Log:
Replaced as.Date(0) by as.Date("1970-01-01") to resolve xts/zoo error.
Modified: pkg/R/calcDvd.R
===================================================================
--- pkg/R/calcDvd.R 2010-03-27 11:39:05 UTC (rev 9)
+++ pkg/R/calcDvd.R 2011-12-21 09:44:05 UTC (rev 10)
@@ -17,8 +17,8 @@
if("dvda" %in% colnames(series)) series$dvda = NULL
if("udvd" %in% colnames(series)) series$udvd = NULL
- divs = rbind(divs, xts(matrix(c(0,0), ncol=2), as.Date(0)))
- txn = rbind(txn, xts(matrix(c(0,0,0), ncol=3), as.Date(0)))
+ divs = rbind(divs, xts(matrix(c(0,0), ncol=2), as.Date("1970-01-01")))
+ txn = rbind(txn, xts(matrix(c(0,0,0), ncol=3), as.Date("1970-01-01")))
txn$pos = cumsum(txn$size)
divs = cbind(divs, na.locf(cbind(divs, txn$pos)$pos), join="left")
More information about the pnl-commits
mailing list