[Blotter-commits] r1494 - pkg/blotter/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Aug 14 05:32:02 CEST 2013
Author: bodanker
Date: 2013-08-14 05:32:01 +0200 (Wed, 14 Aug 2013)
New Revision: 1494
Modified:
pkg/blotter/R/updatePortf.R
Log:
- correct endpoints in case a row appears more than twice
Modified: pkg/blotter/R/updatePortf.R
===================================================================
--- pkg/blotter/R/updatePortf.R 2013-08-14 03:08:03 UTC (rev 1493)
+++ pkg/blotter/R/updatePortf.R 2013-08-14 03:32:01 UTC (rev 1494)
@@ -85,7 +85,7 @@
setNames( merge(last(x[,cLast]), xts(t(colSums(x[,cSums],na.rm=TRUE)),last(index(x)))), colnames(x) )
}
summary.dups <- summary[d,]
- ds <- duplicated(.index(summary.dups))
+ ds <- duplicated(.index(summary.dups)) & !duplicated(.index(summary.dups), fromLast=TRUE)
slist <- period.apply(summary.dups, c(0, which(ds)), f)
summary <- rbind(summary[!d,], slist) # put it all back together
}
More information about the Blotter-commits
mailing list