[Rcpp-commits] r3520 - pkg/RcppSMC/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Mar 18 12:11:45 CET 2012
Author: adamj
Date: 2012-03-18 12:11:44 +0100 (Sun, 18 Mar 2012)
New Revision: 3520
Modified:
pkg/RcppSMC/R/pfNonlinBS.R
Log:
Fixing indexing bug in plotting routine.
Modified: pkg/RcppSMC/R/pfNonlinBS.R
===================================================================
--- pkg/RcppSMC/R/pfNonlinBS.R 2012-03-18 02:17:27 UTC (rev 3519)
+++ pkg/RcppSMC/R/pfNonlinBS.R 2012-03-18 11:11:44 UTC (rev 3520)
@@ -8,8 +8,8 @@
time <- 1:length(data);
if (plot) {
with(res, plot(time,mean,type='l',xlab='time',ylab='estimate'))
- with(res,polygon(c(time,51-time),c(mean-2*sd,(mean+2*sd)[seq(length(data),1,-1)]),col='palegreen1',border=NA))
- with(res,polygon(c(time,51-time),c(mean-1*sd,(mean+1*sd)[seq(length(data),1,-1)]),col='palegreen3',border=NA))
+ with(res,polygon(c(time,seq(length(data),1,-1)),c(mean-2*sd,(mean+2*sd)[seq(length(data),1,-1)]),col='palegreen1',border=NA))
+ with(res,polygon(c(time,seq(length(data),1,-1)),c(mean-1*sd,(mean+1*sd)[seq(length(data),1,-1)]),col='palegreen3',border=NA))
with(res,lines(time,mean, lwd=2, col='darkblue'))
}
More information about the Rcpp-commits
mailing list