[r-cran-coda] 32/60: Imported Upstream version 0.13-5

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 2fee781576e2e9d195c4d419c66f62da4b4fd15e
Author: Andreas Tille <tille at debian.org>
Date:   Fri Dec 16 12:09:59 2016 +0100

    Imported Upstream version 0.13-5
---
 DESCRIPTION      | 10 ++++++----
 R/batchSE.R      |  9 ++++++++-
 R/codamenu.R     |  4 ++--
 R/mcmclist.R     | 21 +++++++++++++++++++++
 R/output.R       |  2 +-
 R/raftery.R      |  1 +
 R/trellisplots.R | 14 +++++++-------
 R/util.R         |  2 +-
 man/cumuplot.Rd  |  2 +-
 svn-commit.tmp   |  6 ------
 10 files changed, 48 insertions(+), 23 deletions(-)

diff --git a/DESCRIPTION b/DESCRIPTION
index f9b8dda..1baeeae 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,11 +1,13 @@
 Package: coda
-Version: 0.13-4
-Date: 2009-01-25
+Version: 0.13-5
+Date: 2010-03-19
 Title: Output analysis and diagnostics for MCMC
 Author: Martyn Plummer, Nicky Best, Kate Cowles, Karen Vines
 Maintainer: Martyn Plummer <plummer at iarc.fr>
 Depends: R (>= 2.5.0), lattice
 Description: Output analysis and diagnostics for Markov Chain Monte
-  Carlo simulations. 
+        Carlo simulations.
 License: GPL (>= 2)
-Packaged: Sun Jan 25 21:32:17 2009; martyn
+Packaged: 2010-03-19 10:15:39 UTC; martyn
+Repository: CRAN
+Date/Publication: 2010-03-19 12:57:10
diff --git a/R/batchSE.R b/R/batchSE.R
index 01934c2..d6307a8 100644
--- a/R/batchSE.R
+++ b/R/batchSE.R
@@ -44,5 +44,12 @@
 
 ## 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, ...)
+    if (is.matrix(x))
+        as.data.frame.matrix(x,row.names,optional, ...)
+    else {
+        if (is.null(row.names))
+            row.names <- time(x)
+        data.frame("var1"=as.numeric(x), row.names=row.names)
+    }
+
 }
diff --git a/R/codamenu.R b/R/codamenu.R
index 01751a8..b31cdab 100644
--- a/R/codamenu.R
+++ b/R/codamenu.R
@@ -112,7 +112,7 @@
         if (current.menu == "codamenu.main")
           {
             cat("A crash has occurred in the main menu\nBailing out\n")
-            return();
+            return(invisible());
           }
         else
           {
@@ -839,7 +839,7 @@ function (last.menu)
       index.file <- scan(what = character(), sep = "\n", strip.white = TRUE)
     }
     if (length(index.file) == 0)
-      return()
+      return(invisible())
     cat("Enter CODA output file names, separated by return key\n")
     cat("(leave a blank line when you have finished)\n")
     if (is.R()) {
diff --git a/R/mcmclist.R b/R/mcmclist.R
index 774a7de..e0de6b0 100644
--- a/R/mcmclist.R
+++ b/R/mcmclist.R
@@ -205,3 +205,24 @@
     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 029c2e0..feb6626 100644
--- a/R/output.R
+++ b/R/output.R
@@ -101,7 +101,7 @@ function (x, col = topo.colors(10), ...)
     text(Nvar - ydelta, Nvar, "1", adj = c(1, 1))
     text(Nvar - ydelta, 0.5 * Nvar, "-1", adj = c(1, 0))
     text(Nvar - ydelta, 0.75 * Nvar, "0", adj = c(1, 0.5))
-    return()
+    invisible()
 }
 
 "densplot" <-
diff --git a/R/raftery.R b/R/raftery.R
index c8a7bf0..2c88426 100644
--- a/R/raftery.R
+++ b/R/raftery.R
@@ -28,6 +28,7 @@ function (data, q = 0.025, r = 0.005, s = 0.95, converge.eps = 0.001)
         while (bic >= 0) {
             kthin <- kthin + thin(data)
             testres <- as.vector(window.mcmc(dichot, thin = kthin))
+            testres <- factor(testres, levels=c(FALSE,TRUE))
             newdim <- length(testres)
             testtran <- table(testres[1:(newdim - 2)], testres[2:(newdim - 
                 1)], testres[3:newdim])
diff --git a/R/trellisplots.R b/R/trellisplots.R
index 01c2ee2..0949cb2 100644
--- a/R/trellisplots.R
+++ b/R/trellisplots.R
@@ -174,7 +174,7 @@ densityplot.mcmc <-
 ### original.  But that's true even if the original mcmc object was
 ### itself already thinned.
 
-    densityplot(form, data = data[subset, ],
+    densityplot(form, data = data[subset, , drop=FALSE],
                 outer = TRUE,
                 aspect = aspect,
                 default.scales = default.scales,
@@ -201,7 +201,7 @@ densityplot.mcmc.list <-
       stop("This function is not yet available in S-PLUS")
     }
     if (groups && outer) warning("'groups=TRUE' ignored when 'outer=TRUE'")
-    datalist <- lapply(x, function(x) as.data.frame(x)[subset, ])
+    datalist <- lapply(x, function(x) as.data.frame(x)[subset, ,drop=FALSE])
     data <- do.call("rbind", datalist)
     form <-
         if (outer)
@@ -269,7 +269,7 @@ qqmath.mcmc <-
         as.formula(paste("~",
                          paste(lapply(names(data), as.name),
                                collapse = "+")))
-    qqmath(form, data = data[subset, ],
+    qqmath(form, data = data[subset, ,drop=FALSE],
            outer = TRUE,
            aspect = aspect,
            prepanel = prepanel,
@@ -296,7 +296,7 @@ qqmath.mcmc.list <-
       stop("This function is not yet available in S-PLUS")
     }
     if (groups && outer) warning("'groups=TRUE' ignored when 'outer=TRUE'")
-    datalist <- lapply(x, function(x) as.data.frame(x)[subset, ])
+    datalist <- lapply(x, function(x) as.data.frame(x)[subset, , drop=FALSE])
     data <- do.call("rbind", datalist)
     form <-
         if (outer)
@@ -485,7 +485,7 @@ acfplot.mcmc <-
     {
         as.vector(acf(x, lag.max = lag.max, plot = FALSE)$acf)
     }
-    data <- as.data.frame(apply(x[subset, ], 2, getAcf, lag.max = lag.max))
+    data <- as.data.frame(apply(as.matrix(x)[subset, ,drop=FALSE], 2, getAcf, lag.max = lag.max))
     form <-
         eval(parse(text = paste(paste(lapply(names(data), as.name),
                    collapse = "+"), "~.lag")))
@@ -537,7 +537,7 @@ acfplot.mcmc.list <-
     {
         datalist <-
             lapply(x, function(x) 
-                   as.data.frame(apply(x[subset, ], 2,
+                   as.data.frame(apply(as.matrix(x)[subset, ,drop=FALSE], 2,
                                        getAcf, lag.max = lag.max)))
         data <- do.call("rbind", datalist)
     }
@@ -546,7 +546,7 @@ acfplot.mcmc.list <-
         ## this is not quite valid, as we are combining multiple
         ## series, but shouldn't be too bad (FIXME: should we warn?)
 
-        datalist <- lapply(x, function(x) x[subset, ])
+        datalist <- lapply(x, function(x) as.matrix(x)[subset, ,drop=FALSE])
         data <-
             as.data.frame(apply(do.call("rbind", datalist),
                                 2, getAcf, lag.max = lag.max))
diff --git a/R/util.R b/R/util.R
index f9e09e8..400f5af 100644
--- a/R/util.R
+++ b/R/util.R
@@ -23,7 +23,7 @@ function (string, option)
     names(arg) <- option
     coda.options(arg)
   }
-  return()
+  invisible()
 }
 
 "coda.options" <-
diff --git a/man/cumuplot.Rd b/man/cumuplot.Rd
index 5a642d0..7603461 100644
--- a/man/cumuplot.Rd
+++ b/man/cumuplot.Rd
@@ -26,6 +26,6 @@
 }
   
 \author{
-  Arni Magnusson <arnima at u.washington.edu>
+  Arni Magnusson 
 }
 \keyword{hplot}
diff --git a/svn-commit.tmp b/svn-commit.tmp
deleted file mode 100644
index 7358da9..0000000
--- a/svn-commit.tmp
+++ /dev/null
@@ -1,6 +0,0 @@
-Fixing parse errors in documentation
---This line, and those below, will be ignored--
-
-M    DESCRIPTION
-M    man/heidel.diag.Rd
-M    man/gelman.diag.Rd

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