[r-cran-coda] 34/60: Imported Upstream version 0.14-2

Andreas Tille tille at debian.org
Fri Dec 16 12:11:25 UTC 2016


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository r-cran-coda.

commit 7b6e78b7f26ca0728ae7d2b430f691bf6f61c0bd
Author: Andreas Tille <tille at debian.org>
Date:   Fri Dec 16 12:10:00 2016 +0100

    Imported Upstream version 0.14-2
---
 CHANGELOG        |  8 ++++++++
 DESCRIPTION      |  8 ++++----
 NAMESPACE        |  6 +++++-
 R/cumuplot.R     |  2 +-
 R/heidel.R       |  2 +-
 R/mcmc.R         |  8 ++++++++
 R/mcmclist.R     | 32 +++++++++++---------------------
 R/output.R       |  5 ++---
 man/plot.mcmc.Rd |  2 +-
 man/traceplot.Rd |  2 +-
 10 files changed, 42 insertions(+), 33 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index fdcb7d3..5581466 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,11 @@
+0.14-2
+- Fix documentation bugs (Thanks to Kurt Hornik)
+
+0.14-1
+- traceplot and plot.mcmc no longer plot a smooth line by default,
+  although it can be added using smooth=TRUE
+- new head and tail methods for mcmc and mcmc.list objects
+
 0.13-1
 - as.mcmc.list generic and default method are exported in namespace
 
diff --git a/DESCRIPTION b/DESCRIPTION
index 1baeeae..aea75b9 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,6 +1,6 @@
 Package: coda
-Version: 0.13-5
-Date: 2010-03-19
+Version: 0.14-2
+Date: 2010-12-08
 Title: Output analysis and diagnostics for MCMC
 Author: Martyn Plummer, Nicky Best, Kate Cowles, Karen Vines
 Maintainer: Martyn Plummer <plummer at iarc.fr>
@@ -8,6 +8,6 @@ Depends: R (>= 2.5.0), lattice
 Description: Output analysis and diagnostics for Markov Chain Monte
         Carlo simulations.
 License: GPL (>= 2)
-Packaged: 2010-03-19 10:15:39 UTC; martyn
+Packaged: 2010-12-08 13:41:18 UTC; martyn
 Repository: CRAN
-Date/Publication: 2010-03-19 12:57:10
+Date/Publication: 2010-12-09 11:29:20
diff --git a/NAMESPACE b/NAMESPACE
index daa17e8..a90813f 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -84,6 +84,8 @@ S3method(summary, mcmc)
 S3method(thin, mcmc) 
 S3method(time, mcmc)
 S3method(window, mcmc)
+S3method(head, mcmc)
+S3method(tail, mcmc)
 ##RGA
 S3method(autocorr.diag, mcmc)
 S3method(rejectionRate, mcmc)
@@ -103,6 +105,8 @@ S3method(summary, mcmc.list)
 S3method(thin, mcmc.list)
 S3method(time, mcmc.list)
 S3method(window, mcmc.list)
+S3method(head, mcmc.list)
+S3method(tail, mcmc.list)
 ##RGA
 S3method(autocorr.diag, mcmc.list)
 S3method(rejectionRate, mcmc.list)
@@ -120,7 +124,7 @@ S3method(print, summary.mcmc)
 ## Imports
 importFrom(stats, start, end, frequency, time, window)
 importFrom(lattice, xyplot, qqmath, densityplot, levelplot)
-
+importFrom(utils, head, tail)
 
 ## lattice methods
 
diff --git a/R/cumuplot.R b/R/cumuplot.R
index 897bff1..fd65667 100644
--- a/R/cumuplot.R
+++ b/R/cumuplot.R
@@ -21,7 +21,7 @@ cumuplot <- function(x, probs=c(0.025,0.5,0.975), ylab="", lty=c(2,1),
               cquant[i,] <- quantile(z[1:i], probs=probs)
             }
         cquant <- as.data.frame(cquant)
-        names(cquant) <- paste(formatC(100*probs,format="fg",wid=1,digits=7),
+        names(cquant) <- paste(formatC(100*probs,format="fg",width=1,digits=7),
                                "%", sep="")  # just like quantile.default
         return(cquant)
     }
diff --git a/R/heidel.R b/R/heidel.R
index 6b97968..10486ce 100644
--- a/R/heidel.R
+++ b/R/heidel.R
@@ -77,7 +77,7 @@
   for (i in 1:ncol(x))
   {
       lm.out <- lm(x[,i] ~ z)
-      if (identical(all.equal(var(residuals(lm.out)), 0), TRUE)) {
+      if (identical(all.equal(sd(residuals(lm.out)), 0), TRUE)) {
           v0[i] <- 0
           order[i] <- 0
       }
diff --git a/R/mcmc.R b/R/mcmc.R
index 7503d6e..c9f3fff 100644
--- a/R/mcmc.R
+++ b/R/mcmc.R
@@ -315,3 +315,11 @@ function (Nchains = 1, Nparms = 1, nplots = 1, sepplot = FALSE)
   }
   return(mfrow)
 }
+
+head.mcmc <- function(x, n = 6L, ...) {
+    window.mcmc(x, end=min(start.mcmc(x) + n * thin.mcmc(x), end.mcmc(x)))
+}
+
+tail.mcmc <- function(x, n = 6L, ...) {
+    window.mcmc(x, start=max(end.mcmc(x) - n * thin.mcmc(x), start.mcmc(x)))
+}
diff --git a/R/mcmclist.R b/R/mcmclist.R
index e0de6b0..6e27660 100644
--- a/R/mcmclist.R
+++ b/R/mcmclist.R
@@ -187,6 +187,17 @@
   structure(lapply(x, window.mcmc, ...), class = "mcmc.list")
 }
 
+"head.mcmc.list" <- function (x, ...) 
+{
+  structure(lapply(x, head.mcmc, ...), class = "mcmc.list")
+}
+
+
+"tail.mcmc.list" <- function (x, ...) 
+{
+  structure(lapply(x, tail.mcmc, ...), class = "mcmc.list")
+}
+
 "as.mcmc.list" <- function (x, ...) 
   UseMethod("as.mcmc.list")
 
@@ -205,24 +216,3 @@
     return(y)
 }
 
-#FIXME: Check this
-"as.mcmc.list.bugs" <-
-function( x, ... )
-{
-    nchain <- x$n.chains
-    
-    start <- x$n.burnin + 1 #FIXME: Is this correct starting value?
-    thin <- x$n.thin 
-
-    parameter.names <- x$root.short
-    
-    zz <- vector("list", x$n.chains)
-
-    aa <- x$sims.array
-    for( i in 1:nchain) {
-        bb <- aa[,i,]
-        
-        zz[[i]] <- mcmc(aa[,i,], start=start, thin=thin)
-    }
-    mcmc.list( zz[-1] )
-}
diff --git a/R/output.R b/R/output.R
index feb6626..e5195ea 100644
--- a/R/output.R
+++ b/R/output.R
@@ -327,8 +327,7 @@ function (stem = "", start, end, thin, quiet = FALSE)
 }
 
 "traceplot" <-
-function (x, smooth = TRUE, col = 1:6, type = "l", ylab = "", 
-    ...) 
+function (x, smooth = FALSE, col = 1:6, type = "l", ylab = "", ...) 
 {
   x <- mcmc.list(x)
   args <- list(...)
@@ -350,7 +349,7 @@ function (x, smooth = TRUE, col = 1:6, type = "l", ylab = "",
   }
 }
 
-"plot.mcmc" <- function (x, trace = TRUE, density = TRUE, smooth = TRUE, bwf, 
+"plot.mcmc" <- function (x, trace = TRUE, density = TRUE, smooth = FALSE, bwf, 
                          auto.layout = TRUE, ask = dev.interactive(), ...) 
 {
   oldpar <- NULL
diff --git a/man/plot.mcmc.Rd b/man/plot.mcmc.Rd
index defbdf0..74b626d 100644
--- a/man/plot.mcmc.Rd
+++ b/man/plot.mcmc.Rd
@@ -3,7 +3,7 @@
 \title{Summary plots of mcmc objects}
 
 \usage{
-\method{plot}{mcmc}(x, trace = TRUE, density = TRUE, smooth = TRUE, bwf,
+\method{plot}{mcmc}(x, trace = TRUE, density = TRUE, smooth = FALSE, bwf,
 	auto.layout = TRUE, ask = dev.interactive(), \dots)
 }
 
diff --git a/man/traceplot.Rd b/man/traceplot.Rd
index fa77bc7..2b2501e 100644
--- a/man/traceplot.Rd
+++ b/man/traceplot.Rd
@@ -2,7 +2,7 @@
 \alias{traceplot}
 \title{Trace plot of MCMC output}
 
-\usage{traceplot(x, smooth = TRUE, col, type, ylab, \dots)}
+\usage{traceplot(x, smooth = FALSE, col = 1:6, type = "l", ylab = "", \dots)}
 
 \arguments{
   \item{x}{An \code{mcmc} or \code{mcmc.list} object}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/r-cran-coda.git



More information about the debian-science-commits mailing list