[r-cran-coda] 15/60: Imported Upstream version 0.10-6

Andreas Tille tille at debian.org
Fri Dec 16 12:11:23 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 36636648dd243aeb7d47a097bcf599766e6a5b3d
Author: Andreas Tille <tille at debian.org>
Date:   Fri Dec 16 12:09:56 2016 +0100

    Imported Upstream version 0.10-6
---
 CHANGELOG       |  5 +++++
 DESCRIPTION     |  4 ++--
 R/HPDinterval.R |  4 +++-
 R/batchSE.R     |  4 ++--
 R/codamenu.R    | 14 --------------
 5 files changed, 12 insertions(+), 19 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index 1025e37..ec4a8c0 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,8 @@
+0.10-6
+- Fixed HPDinterval() for univariate chains
+  Thanks to David LeBlond
+- Fixed optional parameters in as.data.frame method for mcmc objects
+
 0.10-5
 - Registered default method for as.mcmc in NAMESPACE
   Thanks to Christian Grose
diff --git a/DESCRIPTION b/DESCRIPTION
index 7b1d172..452eb68 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,5 +1,5 @@
 Package: coda
-Version: 0.10-5
+Version: 0.10-6
 Date: 2006-03-27
 Title: Output analysis and diagnostics for MCMC
 Author: Martyn Plummer, Nicky Best, Kate Cowles, Karen Vines
@@ -8,4 +8,4 @@ Depends: R (>= 2.2.0), lattice
 Description: Output analysis and diagnostics for Markov Chain Monte
   Carlo simulations. 
 License: GPL Version 2 or later.
-Packaged: Mon Mar 27 10:18:20 2006; martyn
+Packaged: Wed Jul 26 18:25:25 2006; martyn
diff --git a/R/HPDinterval.R b/R/HPDinterval.R
index eaab4a7..275f0b5 100644
--- a/R/HPDinterval.R
+++ b/R/HPDinterval.R
@@ -2,13 +2,15 @@ HPDinterval <- function(obj, prob = 0.95, ...) UseMethod("HPDinterval")
 
 HPDinterval.mcmc <- function(obj, prob = 0.95, ...)
 {
+    obj <- as.matrix(obj)
     vals <- apply(obj, 2, sort)
     if (!is.matrix(vals)) stop("obj must have nsamp > 1")
     nsamp <- nrow(vals)
     npar <- ncol(vals)
     gap <- max(1, min(nsamp - 1, round(nsamp * prob)))
     init <- 1:(nsamp - gap)
-    inds <- apply(vals[init + gap, ] - vals[init, ], 2, which.min)
+    inds <- apply(vals[init + gap, ,drop=FALSE] - vals[init, ,drop=FALSE],
+                  2, which.min)
     ans <- cbind(vals[cbind(inds, 1:npar)],
                  vals[cbind(inds + gap, 1:npar)])
     dimnames(ans) <- list(colnames(obj), c("lower", "upper"))
diff --git a/R/batchSE.R b/R/batchSE.R
index f307b4c..7da64af 100644
--- a/R/batchSE.R
+++ b/R/batchSE.R
@@ -45,6 +45,6 @@
 }
 
 ## Needed for this function, but generally useful anyway.
-as.data.frame.mcmc <- function(x, row.names = NULL, optional=FALSE) {
-  as.data.frame.matrix(x,row.names,optional)
+as.data.frame.mcmc <- function(x, row.names = NULL, optional=FALSE, ...) {
+  as.data.frame.matrix(x,row.names,optional, ...)
 }
diff --git a/R/codamenu.R b/R/codamenu.R
index bbcc4ef..4062250 100644
--- a/R/codamenu.R
+++ b/R/codamenu.R
@@ -692,20 +692,6 @@ function ()
   return("codamenu.options.plot")
 }
 
-"codamenu.options.plot.ps" <- function () 
-{
-  choices <- c("Portrait", "Landscape")
-  pick <- menu(choices, "Select options for saving plots to PostScript files")
-  if (pick == 0) 
-    return("quit")
-  else coda.options(ps.orientation = c("portrait", "landscape")[pick])
-  if (.Device == "X11") 
-    x11(orientation = coda.options("ps.orientation"))
-  else if (.Device == "Win32") 
-    windows(orientation = coda.options("ps.orientation"))
-  return("codamenu.options.plot")
-}
-
 "codamenu.options.raftery" <- function (last.menu) 
 {
   coda.options(q = read.and.check("Enter quantile to be estimated:", 

-- 
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