diff -Nru r-cran-coda-0.17-1/CHANGELOG r-cran-coda-0.18-1/CHANGELOG --- r-cran-coda-0.17-1/CHANGELOG 2015-03-03 17:20:55.000000000 +0000 +++ r-cran-coda-0.18-1/CHANGELOG 2015-10-16 14:52:20.000000000 +0000 @@ -1,3 +1,18 @@ +0.18-1 Martyn Plummer + + - Arni Magnusson is fully credited as coauthor + + - Fixed bug in "varnames<-", which failed when the mcmc object was + not a matrix. Thanks to Evangelos Evangelou and Pavel Krivitsky. + + - NAMESPACE file now includes imports of functions from base packages. + + - codamenu no longer gives option to save mcmc object on exit. + +0.17-2 Martyn Plummer + + - Avoid redundant copies when subsetting mcmc.list objects + 0.17-1 Martyn Plummer - Moved lattice package from Depends to Imports in DESCRIPTION Binary files /tmp/HekrtJwaIB/r-cran-coda-0.17-1/data/line.rda and /tmp/as7Bo6jYLa/r-cran-coda-0.18-1/data/line.rda differ diff -Nru r-cran-coda-0.17-1/debian/changelog r-cran-coda-0.18-1/debian/changelog --- r-cran-coda-0.17-1/debian/changelog 2015-03-08 21:32:02.000000000 +0000 +++ r-cran-coda-0.18-1/debian/changelog 2015-10-28 17:59:21.000000000 +0000 @@ -1,3 +1,9 @@ +r-cran-coda (0.18-1-1) unstable; urgency=medium + + * New upstream release. + + -- Chris Lawrence Wed, 28 Oct 2015 13:59:05 -0400 + r-cran-coda (0.17-1-1) unstable; urgency=medium * New upstream release. diff -Nru r-cran-coda-0.17-1/DESCRIPTION r-cran-coda-0.18-1/DESCRIPTION --- r-cran-coda-0.17-1/DESCRIPTION 2015-03-03 18:25:43.000000000 +0000 +++ r-cran-coda-0.18-1/DESCRIPTION 2015-10-16 18:00:43.000000000 +0000 @@ -1,6 +1,6 @@ Package: coda -Version: 0.17-1 -Date: 2015-03-02 +Version: 0.18-1 +Date: 2015-10-16 Title: Output Analysis and Diagnostics for MCMC Authors@R: c(person("Martyn", "Plummer", role=c("aut","cre","trl"), email="plummerm@iarc.fr"), @@ -9,7 +9,8 @@ person("Karen", "Vines", role="aut"), person("Deepayan", "Sarkar", role="aut"), person("Douglas", "Bates", role="aut"), - person("Russell", "Almond", role="aut")) + person("Russell", "Almond", role="aut"), + person("Arni", "Magnusson", role="aut")) Depends: R (>= 2.14.0) Imports: lattice Description: Provides functions for summarizing and plotting the @@ -17,15 +18,16 @@ well as diagnostic tests of convergence to the equilibrium distribution of the Markov chain. License: GPL (>= 2) -Packaged: 2015-03-03 17:21:11 UTC; martyn +NeedsCompilation: no +Packaged: 2015-10-16 14:52:42 UTC; martyn Author: Martyn Plummer [aut, cre, trl], Nicky Best [aut], Kate Cowles [aut], Karen Vines [aut], Deepayan Sarkar [aut], Douglas Bates [aut], - Russell Almond [aut] + Russell Almond [aut], + Arni Magnusson [aut] Maintainer: Martyn Plummer -NeedsCompilation: no Repository: CRAN -Date/Publication: 2015-03-03 19:25:43 +Date/Publication: 2015-10-16 20:00:43 diff -Nru r-cran-coda-0.17-1/inst/AUTHORS r-cran-coda-0.18-1/inst/AUTHORS --- r-cran-coda-0.17-1/inst/AUTHORS 2007-10-02 09:51:41.000000000 +0000 +++ r-cran-coda-0.18-1/inst/AUTHORS 2015-10-15 07:44:13.000000000 +0000 @@ -21,6 +21,19 @@ All authors, and the MRC Biostatistic Unit, have given permission for the license terms to be changed to GPL. +Other authors of CODA +--------------------- + +Deepayan Sarkar provided lattice graphics functions (See ?densityplot.mcmc) + +Douglas Bates wrote the HPDinterval function. + +Russell Almond , provided a number +of cleanups and wrote the functions autocorr.diag, batchSE, and +rejectionRate. + +Arni Magnusson wrote the cumuplot function. + Further credits --------------- @@ -35,5 +48,3 @@ Andrew Martin added namespace facilities and fixed a large number of bugs that this change uncovered (see CHANGELOG) -Russell Almond , provided a number -of cleanups and additions (see CHANGELOG). diff -Nru r-cran-coda-0.17-1/man/cumuplot.Rd r-cran-coda-0.18-1/man/cumuplot.Rd --- r-cran-coda-0.17-1/man/cumuplot.Rd 2010-02-22 08:16:41.000000000 +0000 +++ r-cran-coda-0.18-1/man/cumuplot.Rd 2015-10-14 15:59:54.000000000 +0000 @@ -25,7 +25,5 @@ number of iterations. } -\author{ - Arni Magnusson -} +\author{Arni Magnusson} \keyword{hplot} diff -Nru r-cran-coda-0.17-1/MD5 r-cran-coda-0.18-1/MD5 --- r-cran-coda-0.17-1/MD5 2015-03-03 18:25:43.000000000 +0000 +++ r-cran-coda-0.18-1/MD5 2015-10-16 18:00:43.000000000 +0000 @@ -1,28 +1,28 @@ -370fb32c3079904dfc365e55676f04d5 *CHANGELOG -8bb04518c5614ce417d2ec9ee3fc45de *DESCRIPTION +5d573790477b5f532496ced708cf98b1 *CHANGELOG +ee63dce424da3eb1d6694384207193d5 *DESCRIPTION ff890b50eaa074ed668c6f2fac1b4141 *INDEX -adcc371105f44cfe439cd60f8ff727d4 *NAMESPACE +201d6ba76723e5bc6a9a51df4d7f99a3 *NAMESPACE 45f88adec7bcfab586a4deebba1cc02d *R/HPDinterval.R 841853b3b96462cffe376cf9fad6abb9 *R/autocorrdiag.R 02152920c66f540422f88e51c88f0428 *R/batchSE.R -a22da830a261cd0f28da6052c560d5df *R/codamenu.R +4e1a55cb0aed5bcaa0f2f9d474e2fdea *R/codamenu.R df4c85619867ba81878499f5059e875d *R/cumuplot.R 7403a684ac51932afbbb617d1f606a9a *R/gelman.R a97024cb207bcef6fd4bc7c00283c1ed *R/geweke.R 6fb74d6977e5e3b5190eda35829cdc23 *R/heidel.R ae77a3ec34f086bd7ec8ea787baeeb1e *R/jags.R -f3b382582d73aad54d77c4c655513c58 *R/mcextractor.R +0473eacf2812c4d9641e1c7fd09056b4 *R/mcextractor.R 97fef151be1d2924942ca84de70c87f4 *R/mcmc.R -36759e063fe91197b2ef29b4b288eaee *R/mcmclist.R +f60ceb305b2ab088484ab63d938333d1 *R/mcmclist.R bd120c9296e4467265ee10409799e61f *R/output.R 389758882050a375ac4b5298a42ae35f *R/raftery.R 4caafbeb9941605b240d3ae9f6c8d5ff *R/rejectionRate.R d41d8cd98f00b204e9800998ecf8427e *R/thin.R 553b1effc0816a68e0ad4dfd7847757f *R/trellisplots.R -ffc99e7d181a7308c8aef6ea059a8d51 *R/util.R +1e363c43c22c2a0e9658866463a0542d *R/util.R 4d7d828d6d2b4fee5357d3a4dd108458 *README -2d8879e17e372a474e9c9c1057129b02 *data/line.rda -3ad76246334ca13bb7cba54ce71e48bd *inst/AUTHORS +ff0a8b17ed6881971cbd33c7ddb3fbda *data/line.rda +52066ed7a20504a282a091060a794d57 *inst/AUTHORS 81c1ae300d47f9a787eb871fbaafeb9f *inst/CITATION 868ded8f4d10a67c7b31854bce6f3d63 *man/Cramer.Rd 7bfe602ce737efac910300e5be5a8552 *man/HPDinterval.Rd @@ -36,7 +36,7 @@ 04dd4994917068f5d36fbcff921deb7f *man/codamenu.Rd d3b21ba8f4c82fd92adfb1d4380d4cc8 *man/crosscorr.Rd 80c2893a13683e442443b36764810498 *man/crosscorr.plot.Rd -2cc5efe9b602aae1ad07e0f7266142b6 *man/cumuplot.Rd +18609dc8a896f624c979de557280cbf0 *man/cumuplot.Rd 14365306d891deafd1ca602f59e4520f *man/densplot.Rd 2b5bbbb8d683384c9287a9c8e1f7a01f *man/effectiveSize.Rd c78c35ac982bcd74befe51f98ba641e4 *man/gelman.diag.Rd diff -Nru r-cran-coda-0.17-1/NAMESPACE r-cran-coda-0.18-1/NAMESPACE --- r-cran-coda-0.17-1/NAMESPACE 2015-03-02 12:44:07.000000000 +0000 +++ r-cran-coda-0.18-1/NAMESPACE 2015-10-15 10:06:29.000000000 +0000 @@ -123,11 +123,18 @@ S3method(print, summary.mcmc) ## Imports -importFrom(stats, start, end, frequency, time, window, as.ts) -importFrom(lattice, xyplot, qqmath, densityplot, levelplot, panel.abline, - panel.xyplot, trellis.par.get, do.breaks, panel.superpose, - prepanel.qqmathline, splom) -importFrom(utils, head, tail) + +importFrom(grDevices, dev.cur, dev.interactive, dev.off, postscript, + topo.colors) +importFrom(graphics, abline, axis, hist, legend, lines, matplot, par, + plot, polygon, text, title) +importFrom(lattice, xyplot, qqmath, densityplot, levelplot, + panel.abline, panel.xyplot, trellis.par.get, do.breaks, + panel.superpose, prepanel.qqmathline, splom) +importFrom(stats, Gamma, IQR, acf, aggregate, ar, as.formula, as.ts, + cor, density, end, fft, frequency, glm, lm, lowess, predict, qf, + qnorm, quantile, residuals, sd, start, time, ts, var, window) +importFrom(utils, head, menu, read.table, tail) ## lattice methods diff -Nru r-cran-coda-0.17-1/R/codamenu.R r-cran-coda-0.18-1/R/codamenu.R --- r-cran-coda-0.17-1/R/codamenu.R 2011-11-02 11:25:47.000000000 +0000 +++ r-cran-coda-0.18-1/R/codamenu.R 2015-10-16 14:50:56.000000000 +0000 @@ -12,7 +12,6 @@ if (is.null(coda.dat)) { return(invisible()) } - coda.options(data.saved = FALSE) } else if (pick == 2) { msg <- "\nEnter name of saved object (or type \"exit\" to quit)" @@ -45,8 +44,6 @@ if (is.matrix(coda.dat[[1]]) && is.null(varnames(coda.dat))) { varnames(coda.dat) <- varnames(coda.dat, allow.null = FALSE) } - on.exit(tidy.up(coda.dat)) - ## Check for variables that are linear functions of the ## iteration number @@ -874,19 +871,6 @@ return(mcmc.list(chains)) } -"tidy.up" <- function (data) -{ - cat("\nQuitting codamenu ...\n") - if (!coda.options("data.saved")) { - ans <- read.yesno("Do you want to save the mcmc output", default=FALSE) - if (ans == TRUE) { - cat("Enter name you want to call this object:\n") - fname <- scan(what = character(), nmax = 1, strip.white = TRUE) - assign(fname, data, pos=1) - } - } -} - "codamenu.ps" <- function () { if (names(dev.cur()) == "postscript") { diff -Nru r-cran-coda-0.17-1/R/mcextractor.R r-cran-coda-0.18-1/R/mcextractor.R --- r-cran-coda-0.17-1/R/mcextractor.R 2007-10-02 09:51:41.000000000 +0000 +++ r-cran-coda-0.18-1/R/mcextractor.R 2015-10-15 10:18:24.000000000 +0000 @@ -38,10 +38,14 @@ function (x, value) { if (is.mcmc(x)) { - dimnames(x)[[2]] <- value + if (length(dim(x)) < 2) { + dim(x) <- c(length(x), 1) + } + colnames(x) <- value } - else if (is.mcmc.list(x)) + else if (is.mcmc.list(x)) { for (i in 1:nchain(x)) varnames(x[[i]]) <- value + } else stop("Not an mcmc or mcmc.list object") x } diff -Nru r-cran-coda-0.17-1/R/mcmclist.R r-cran-coda-0.18-1/R/mcmclist.R --- r-cran-coda-0.17-1/R/mcmclist.R 2015-03-02 14:16:25.000000000 +0000 +++ r-cran-coda-0.18-1/R/mcmclist.R 2015-03-16 10:53:52.000000000 +0000 @@ -1,39 +1,61 @@ "[.mcmc.list" <- function (x, i, j, drop = TRUE) { - ## In S-PLUS the code is altered so that the user can - ## pick out particular parameters by calling mcmc.obj[,c("param1", "param2")] + ## In S-PLUS the code is altered so that the user can + ## pick out particular parameters by calling + ## mcmc.obj[,c("param1", "param2")] - ## Trying to squeeze too much functionality in here - ## x[p:q] will subset the list - ## x[p,], x[,q], x[p,q] will be recursively applied to - ## the elements of the list, even if they are vectors - if (nargs() < 3 + !missing(drop)) { - ## Subset the list - if (is.R()) { - y <- NextMethod("[") + ## Trying to squeeze too much functionality in here + ## x[p:q] will subset the list + ## x[p,], x[,q], x[p,q] will be recursively applied to + ## the elements of the list, even if they are vectors + + if (nargs() < 3 + !missing(drop)) { + ## Subset the list + if (is.R()) { + y <- NextMethod("[") + } + else { + y <- as.matrix(x)[i,j] + } } else { - y <- as.matrix(x)[i,j] + ## Subset the elements of the list + y <- vector("list", length(x)) + names(y) <- names(x) + for (k in 1:length(y)) { + y[[k]] <- if (missing(i) && missing(j)) { + x[[k]] + } + else if (is.matrix(x[[k]])) { + if (missing(i)) { + x[[k]][, j, drop = drop] + } + else if (missing(j)) { + x[[k]][i, , drop = drop] + } + else { + x[[k]][i, j, drop = drop] + } + } + else { + ### Coerce x[[k]] to matrix before subsetting + z <- as.matrix.mcmc(x[[k]]) + if (missing(i)) { + mcmc(z[, j, drop = TRUE], start(x), end(x), thin(x)) + } + else if (missing(j)) { + z[i, , drop = TRUE] + } + else { + z[i, j, drop = TRUE] + } + } + } } - } - else { - ## Subset the elements of the list - y <- vector("list", length(x)) - names(y) <- names(x) - for (k in 1:length(y)) { - drop1 <- drop | !is.matrix(x[[k]]) - y[[k]] <- if (missing(i) && missing(j)) - x[[k]] - else if (missing(i)) - mcmc(as.matrix(x[[k]])[, j, drop = drop1], start(x), end(x), thin(x)) - else if (missing(j)) - as.matrix(x[[k]])[i, , drop = drop1] - else as.matrix(x[[k]])[i, j, drop = drop1] + if (is.list(y) && all(sapply(y, is.mcmc, simplify = TRUE))) { + y <- mcmc.list(y) } - } - if (is.list(y) && all(sapply(y, is.mcmc, simplify = TRUE))) - y <- mcmc.list(y) - return(y) + return(y) } diff -Nru r-cran-coda-0.17-1/R/util.R r-cran-coda-0.18-1/R/util.R --- r-cran-coda-0.17-1/R/util.R 2015-03-02 13:29:27.000000000 +0000 +++ r-cran-coda-0.18-1/R/util.R 2015-10-16 14:51:12.000000000 +0000 @@ -244,8 +244,7 @@ user.layout = FALSE, gr.bin = 10, geweke.nbin = 20, - gr.max = 50, - data.saved = TRUE + gr.max = 50 ) coda.env <- new.env()