From: <snt...@us...> - 2012-07-12 02:22:18
|
Revision: 253 http://bugs-r.svn.sourceforge.net/bugs-r/?rev=253&view=rev Author: snthomas99 Date: 2012-07-12 02:22:12 +0000 (Thu, 12 Jul 2012) Log Message: ----------- V3.2.2.1 Modified Paths: -------------- trunk/R2OpenBUGS/DESCRIPTION trunk/R2OpenBUGS/R/bugs.log.R trunk/R2OpenBUGS/R/bugs.sims.R trunk/R2OpenBUGS/inst/NEWS trunk/R2OpenBUGS/man/bugs.Rd trunk/R2OpenBUGS/man/bugs.log.Rd Modified: trunk/R2OpenBUGS/DESCRIPTION =================================================================== --- trunk/R2OpenBUGS/DESCRIPTION 2012-05-01 12:57:10 UTC (rev 252) +++ trunk/R2OpenBUGS/DESCRIPTION 2012-07-12 02:22:12 UTC (rev 253) @@ -1,7 +1,7 @@ Package: R2OpenBUGS Title: Running OpenBUGS from R -Date: 2012-2-04 -Version: 3.2-1.4 +Date: 2012-4-20 +Version: 3.2-2.1 Author: originally written as R2WinBUGS by Andrew Gelman <ge...@st...>; changes and packaged by Sibylle Sturtz <st...@st...> and Uwe Ligges <li...@st...>. @@ -14,6 +14,6 @@ in R. Depends: R (>= 2.11.0) Imports: coda (>= 0.11-0), boot -SystemRequirements: OpenBUGS (>= 3.2.1) +SystemRequirements: OpenBUGS (>= 3.2.2) Maintainer: Neal Thomas <snt...@ya...> License: GPL-2 Modified: trunk/R2OpenBUGS/R/bugs.log.R =================================================================== --- trunk/R2OpenBUGS/R/bugs.log.R 2012-05-01 12:57:10 UTC (rev 252) +++ trunk/R2OpenBUGS/R/bugs.log.R 2012-07-12 02:22:12 UTC (rev 253) @@ -18,7 +18,9 @@ if(n.cols < 1) return(NA) mxlen <- sapply(mx, length) end <- which(mxlen!=n.cols)[1] - 1 - mx <- mx[1:end] + if(!is.na(end)){ ### if output block does not end mx + mx <- mx[1:end] + } cm <- matrix(unlist(mx), ncol=n.cols, byrow=TRUE) # character format if(empty.left.col) cm <- cm[,-1] # empty column col.names <- cm[1, -1] # first column is just "node" Modified: trunk/R2OpenBUGS/R/bugs.sims.R =================================================================== --- trunk/R2OpenBUGS/R/bugs.sims.R 2012-05-01 12:57:10 UTC (rev 252) +++ trunk/R2OpenBUGS/R/bugs.sims.R 2012-07-12 02:22:12 UTC (rev 253) @@ -4,7 +4,7 @@ ## Read the simulations from Bugs into R, format them, and monitor convergence sims.files <- paste ("CODAchain", 1:n.chains, ".txt", sep="") ## read in the names of the parameters and the indices of their samples - index <- read.table("CODAindex.txt", header = FALSE, sep = " ") + index <- read.table("CODAindex.txt", header = FALSE, sep = "") parameter.names <- as.vector(index[, 1]) n.keep <- index[1, 3] - index[1, 2] + 1 n.parameters <- length(parameter.names) Modified: trunk/R2OpenBUGS/inst/NEWS =================================================================== --- trunk/R2OpenBUGS/inst/NEWS 2012-05-01 12:57:10 UTC (rev 252) +++ trunk/R2OpenBUGS/inst/NEWS 2012-07-12 02:22:12 UTC (rev 253) @@ -1,6 +1,11 @@ Changes to R2OpenBUGS: ====================== +Update 3.2-2.1 +- Updated reading of CODA file formats for version 3.2.2 of OpenBUGS, which + now consistently uses tab delimiters. Problems with reading the log + file were corrected as part of the new version of OpenBUGS. + Update 3.2-1.4 - Corrected printing of pD and DIC, which were reversed - Updated documentation to note difference in DIC reporting between Windows and Linux, and the lack of support for the bugs.log function under Linux Modified: trunk/R2OpenBUGS/man/bugs.Rd =================================================================== --- trunk/R2OpenBUGS/man/bugs.Rd 2012-05-01 12:57:10 UTC (rev 252) +++ trunk/R2OpenBUGS/man/bugs.Rd 2012-07-12 02:22:12 UTC (rev 253) @@ -75,11 +75,11 @@ when the script has finished running, otherwise \pkg{OpenBUGS} remains open for further investigation. The debug option is not available for linux execution.} \item{DIC}{logical; if \code{TRUE} (default), compute deviance, pD, - and DIC. For Windows execution, the results are extracted directly + and DIC. The results are extracted directly from the \pkg{OpenBUGS} log, which uses the rule \code{pD = - Dbar - Dhat}. For linux execution, or + Dbar - Dhat}. If extraction fails or if there are less iterations than required for the - adaptive phase, the rule \code{pD=var(deviance) / 2} is + adaptive phase, the rule \code{pD=var(deviance) / 2} is computed in R. See \code{\link{bugs.log}} for more information on extracting results from the log file.} \item{digits}{number of significant digits used for \pkg{OpenBUGS} input, see Modified: trunk/R2OpenBUGS/man/bugs.log.Rd =================================================================== --- trunk/R2OpenBUGS/man/bugs.log.Rd 2012-05-01 12:57:10 UTC (rev 252) +++ trunk/R2OpenBUGS/man/bugs.log.Rd 2012-07-12 02:22:12 UTC (rev 253) @@ -17,8 +17,8 @@ \item{DIC}{A matrix containing the DIC statistics as returned from \pkg{OpenBUGS}.} } -\details{ The function is only supported under Windows execution because the \code{OpenBUGS} log file under Linux execution has a different format. The function -returns \code{NA} for both elements of the list under Linux. +\details{Returns the OpenBUGS summary statistics and DIC extracted directly +from the log file. } \seealso{The main function that generates the log file is \code{\link{bugs}}.} \author{Jouni Kerman} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |