You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(11) |
Dec
(20) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
|
Feb
|
Mar
|
Apr
(7) |
May
(24) |
Jun
(15) |
Jul
(5) |
Aug
(21) |
Sep
(85) |
Oct
(9) |
Nov
|
Dec
|
2008 |
Jan
(15) |
Feb
(11) |
Mar
|
Apr
(2) |
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
(29) |
Oct
(47) |
Nov
(1) |
Dec
(1) |
2009 |
Jan
(8) |
Feb
(12) |
Mar
(14) |
Apr
(4) |
May
(1) |
Jun
|
Jul
(5) |
Aug
|
Sep
|
Oct
(11) |
Nov
(18) |
Dec
|
2010 |
Jan
|
Feb
|
Mar
(1) |
Apr
(3) |
May
(24) |
Jun
|
Jul
(1) |
Aug
(7) |
Sep
(5) |
Oct
(3) |
Nov
(4) |
Dec
|
2011 |
Jan
|
Feb
|
Mar
(13) |
Apr
(3) |
May
(2) |
Jun
|
Jul
(1) |
Aug
(24) |
Sep
(3) |
Oct
|
Nov
|
Dec
(29) |
2012 |
Jan
(5) |
Feb
(5) |
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
(3) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
(9) |
May
(1) |
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
|
Jul
(3) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(5) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <chr...@us...> - 2011-03-23 11:58:22
|
Revision: 183 http://bugs-r.svn.sourceforge.net/bugs-r/?rev=183&view=rev Author: chris-jackson Date: 2011-03-23 11:58:16 +0000 (Wed, 23 Mar 2011) Log Message: ----------- Bug fixes ready for version 0.7 release on OpenBUGS wiki Modified Paths: -------------- branches/linux/BRugs/R/unix/zzz.R branches/linux/BRugs/R/unix/zzz.R.in branches/linux/BRugs/R/windows/zzz.R branches/linux/BRugs/R/zzz.R branches/linux/BRugs/src/Makevars Modified: branches/linux/BRugs/R/unix/zzz.R =================================================================== --- branches/linux/BRugs/R/unix/zzz.R 2011-03-22 12:24:38 UTC (rev 182) +++ branches/linux/BRugs/R/unix/zzz.R 2011-03-23 11:58:16 UTC (rev 183) @@ -4,12 +4,15 @@ ## TODO any need for these to be user specifiable? options("BRugsTmpdir" = gsub("\\\\", "/", tempdir())) options("BRugsExtFile" = paste(basename(tempfile()), ".bug", sep="")) - options(OpenBUGS = "/home/chris/usr/lib/OpenBUGS") + options(OpenBUGS = "/usr/local/lib/OpenBUGS") if(is.null(getOption("BRugsVerbose"))) options("BRugsVerbose" = TRUE) .initGlobals() options(OpenBUGSExamples = paste(options()$OpenBUGS, "doc", "Examples", sep="/")) + ver <- system("echo \"modelQuit()\" | OpenBUGS", intern=TRUE) + ver <- sub("OpenBUGS version (([0-9]\\.)+[0-9]).+","\\1",ver[1]) + message("Welcome to BRugs running on OpenBUGS version ", ver) } ".onUnload" <- function(libpath){ Modified: branches/linux/BRugs/R/unix/zzz.R.in =================================================================== --- branches/linux/BRugs/R/unix/zzz.R.in 2011-03-22 12:24:38 UTC (rev 182) +++ branches/linux/BRugs/R/unix/zzz.R.in 2011-03-23 11:58:16 UTC (rev 183) @@ -10,6 +10,9 @@ options("BRugsVerbose" = TRUE) .initGlobals() options(OpenBUGSExamples = paste(options()$OpenBUGS, "doc", "Examples", sep="/")) + ver <- system("echo \"modelQuit()\" | OpenBUGS", intern=TRUE) + ver <- sub("OpenBUGS version (([0-9]\\.)+[0-9]).+","\\1",ver[1]) + message("Welcome to BRugs running on OpenBUGS version ", ver) } ".onUnload" <- function(libpath){ Modified: branches/linux/BRugs/R/windows/zzz.R =================================================================== --- branches/linux/BRugs/R/windows/zzz.R 2011-03-22 12:24:38 UTC (rev 182) +++ branches/linux/BRugs/R/windows/zzz.R 2011-03-23 11:58:16 UTC (rev 183) @@ -2,36 +2,47 @@ ".onLoad" <- function(lib, pkg){ ob.reg <- try(utils:::readRegistry("Software\\OpenBUGS","HLM")) - if (inherits(ob.reg, "try-error")) stop("OpenBUGS 3.2.1 or greater must be installed") + if (inherits(ob.reg, "try-error")) { + warning("OpenBUGS 3.2.1 or greater must be installed") + return + } rnames <- names(ob.reg) ver <- gsub("OpenBUGS ", "", rnames) - ver <- gsub("(.+)e$","\\1", ver) - version.inst <- as.numeric(paste(substr(ver, 1, 2), gsub("\\.","",substr(ver, 3, nchar(ver))), sep="")) + veri <- gsub("(.+)e$","\\1", ver) + version.inst <- as.numeric(paste(substr(veri, 1, 2), gsub("\\.","",substr(veri, 3, nchar(veri))), sep="")) deps <- utils:::packageDescription("BRugs", fields="SystemRequirements") ver <- gsub(".*OpenBUGS ?\\(>= ?(.+)\\).*", "\\1", deps) version.req <- as.numeric(paste(substr(ver, 1, 2), gsub("\\.","",substr(ver, 3, nchar(ver))), sep="")) - if (max(version.inst) < version.req) - stop("Found OpenBUGS version ", version.inst, ". Requires ", version.req, " or greater") + if (max(version.inst) < version.req) { + warning("Found OpenBUGS version ", version.inst, ". Requires ", version.req, " or greater") + return + } ## OpenBUGS installation location - options(OpenBUGS = utils:::readRegistry(paste("Software","OpenBUGS",rnames[which.max(version.inst)],sep="\\"),"HLM")$InstallPath) - libname <- paste(options()$OpenBUGS, "libOpenBUGS.dll", sep="/") + dir <- utils:::readRegistry(paste("Software","OpenBUGS",rnames[which.max(version.inst)],sep="\\"),"HLM")$InstallPath + loadOpenBUGS(dir) + message("Welcome to BRugs running on OpenBUGS version ", veri[which.max(version.inst)]) + } + + ## Load OpenBUGS from specified location + loadOpenBUGS <- function(dir) { + libname <- paste(dir, "libOpenBUGS.dll", sep="/") if (!file.exists(libname)) { - stop("Shared library \"libOpenBUGS.dll\" not found in ", options()$OpenBUGS) + warning("Shared library \"libOpenBUGS.dll\" not found in ", dir) } + options(OpenBUGS = dir) ## All checks passed - load the DLL dyn.load(libname) - len <- nchar(options()$OpenBUGS) - .C("SetWorkingDir", as.character(options()$OpenBUGS), len, PACKAGE="libOpenBUGS") + len <- nchar(dir) + .C("SetWorkingDir", as.character(dir), len, PACKAGE="libOpenBUGS") ## Set temporary dir for "buffer.txt" output tempDir <- gsub("\\\\", "/", tempdir()) .C("SetTempDir", as.character(tempDir), nchar(tempDir), PACKAGE="libOpenBUGS") command <- "BugsMappers.SetDest(2)" .CmdInterpreter(command) - if(is.null(getOption("BRugsVerbose"))) options("BRugsVerbose" = TRUE) .initGlobals() - options(OpenBUGSExamples = paste(options()$OpenBUGS, "Examples", sep="/")) + options(OpenBUGSExamples = paste(dir, "Examples", sep="/")) } ".onUnload" <- function(libpath){ Modified: branches/linux/BRugs/R/zzz.R =================================================================== --- branches/linux/BRugs/R/zzz.R 2011-03-22 12:24:38 UTC (rev 182) +++ branches/linux/BRugs/R/zzz.R 2011-03-23 11:58:16 UTC (rev 183) @@ -1,4 +1,4 @@ -## See unix/zzz.R, windows/zzz.R for platform specific .onLoad functions +## See unix/zzz.R, windows/zzz.R for platform specific .onLoad functions if (is.R()){ @@ -13,10 +13,6 @@ options("BRugsPrec" = 4) } - ".onAttach" <- function(lib, pkg){ - message("Welcome to BRugs running on OpenBUGS version 3.1.2") - } - ## Overwriting new (from R-2.6.0) sQuote (for typing human readable text) in R within the BRugs Namespace! ## we cannot use sQuote that uses fancy quotes! sQuote <- function(x) paste("'", x, "'", sep="") Modified: branches/linux/BRugs/src/Makevars =================================================================== --- branches/linux/BRugs/src/Makevars 2011-03-22 12:24:38 UTC (rev 182) +++ branches/linux/BRugs/src/Makevars 2011-03-23 11:58:16 UTC (rev 183) @@ -1,5 +1,5 @@ -BUGS_LIBS = /home/chris/usr/lib/OpenBUGS/lib/libOpenBUGS.so -BUGS_LDFLAGS = -m32 -Wl,-rpath=/home/chris/usr/lib/OpenBUGS/lib +BUGS_LIBS = /usr/local/lib/OpenBUGS/lib/libOpenBUGS.so +BUGS_LDFLAGS = -m32 -Wl,-rpath=/usr/local/lib/OpenBUGS/lib BugsHelper: mkdir -p ../exec This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <li...@us...> - 2011-03-22 12:24:46
|
Revision: 182 http://bugs-r.svn.sourceforge.net/bugs-r/?rev=182&view=rev Author: ligges Date: 2011-03-22 12:24:38 +0000 (Tue, 22 Mar 2011) Log Message: ----------- file size reduction by qpdf Modified Paths: -------------- trunk/R2WinBUGS/DESCRIPTION trunk/R2WinBUGS/inst/doc/benzolsw.pdf trunk/R2WinBUGS/inst/doc/countssw.pdf trunk/R2WinBUGS/inst/doc/expectedsw.pdf Added Paths: ----------- trunk/R2WinBUGS/inst/doc/R2WinBUGS.pdf Modified: trunk/R2WinBUGS/DESCRIPTION =================================================================== --- trunk/R2WinBUGS/DESCRIPTION 2011-03-21 19:13:27 UTC (rev 181) +++ trunk/R2WinBUGS/DESCRIPTION 2011-03-22 12:24:38 UTC (rev 182) @@ -1,7 +1,7 @@ Package: R2WinBUGS Title: Running WinBUGS and OpenBUGS from R / S-PLUS -Date: 2010-03-18 -Version: 2.1-17 +Date: 2011-03-22 +Version: 2.1-18 Author: originally written by Andrew Gelman <ge...@st...>; changes and packaged by Sibylle Sturtz <st...@st...> and Uwe Ligges <li...@st...>. Added: trunk/R2WinBUGS/inst/doc/R2WinBUGS.pdf =================================================================== --- trunk/R2WinBUGS/inst/doc/R2WinBUGS.pdf (rev 0) +++ trunk/R2WinBUGS/inst/doc/R2WinBUGS.pdf 2011-03-22 12:24:38 UTC (rev 182) @@ -0,0 +1,6876 @@ +%PDF-1.4 +%\xBF\xF7\xA2\xFE +1 0 obj +<< /Names 3 0 R /OpenAction 4 0 R /Outlines 5 0 R /PageMode /UseOutlines /Pages 6 0 R /Type /Catalog >> +endobj +2 0 obj +<< /Author (Sibylle Sturtz, Uwe Ligges, Andrew Gelman) /CreationDate (D:20091108203656+01'00') /Creator (LaTeX with hyperref package) /Keywords (R, WinBUGS, interface, MCMC) /ModDate (D:20091108203656+01'00') /PTEX.Fullbanner (This is MiKTeX-pdfTeX 2.7.3235 \(1.40.9\)) /Producer (pdfTeX-1.40.9) /Subject () /Title (R2WinBUGS: A Package for Running WinBUGS from R) /Trapped /False >> +endobj +3 0 obj +<< /Dests 7 0 R >> +endobj +4 0 obj +<< /D [ 8 0 R /Fit ] /S /GoTo >> +endobj +5 0 obj +<< /Count 5 /First 9 0 R /Last 10 0 R /Type /Outlines >> +endobj +6 0 obj +<< /Count 15 /Kids [ 11 0 R 12 0 R 13 0 R ] /Type /Pages >> +endobj +7 0 obj +<< /Kids [ 14 0 R 15 0 R 16 0 R ] /Limits [ (Doc-Start) (subsection.4.2) ] >> +endobj +8 0 obj +<< /Annots [ 17 0 R 18 0 R 19 0 R 20 0 R 21 0 R 22 0 R 23 0 R 24 0 R 25 0 R 26 0 R 27 0 R 28 0 R 29 0 R 30 0 R 31 0 R 32 0 R 33 0 R 34 0 R 35 0 R 36 0 R 37 0 R 38 0 R 39 0 R ] /Contents 40 0 R /MediaBox [ 0 0 595.276 841.89 ] /Parent 11 0 R /Resources 41 0 R /Type /Page >> +endobj +9 0 obj +<< /A 42 0 R /Next 43 0 R /Parent 5 0 R /Title (Introduction) >> +endobj +10 0 obj +<< /A 44 0 R /Count -1 /First 45 0 R /Last 45 0 R /Parent 5 0 R /Prev 46 0 R /Title (Help page for the function bugs\(\)) >> +endobj +11 0 obj +<< /Count 6 /Kids [ 8 0 R 47 0 R 48 0 R 49 0 R 50 0 R 51 0 R ] /Parent 6 0 R /Type /Pages >> +endobj +12 0 obj +<< /Count 6 /Kids [ 52 0 R 53 0 R 54 0 R 55 0 R 56 0 R 57 0 R ] /Parent 6 0 R /Type /Pages >> +endobj +13 0 obj +<< /Count 3 /Kids [ 58 0 R 59 0 R 60 0 R ] /Parent 6 0 R /Type /Pages >> +endobj +14 0 obj +<< /Kids [ 61 0 R 62 0 R 63 0 R 64 0 R 65 0 R 66 0 R ] /Limits [ (Doc-Start) (cite.Metropolis;Rosenbluth;Rosenbluth;Teller;Teller:1953) ] >> +endobj +15 0 obj +<< /Kids [ 67 0 R 68 0 R 69 0 R 70 0 R 71 0 R 72 0 R ] /Limits [ (cite.Plummer:2003) (section.2) ] >> +endobj +16 0 obj +<< /Kids [ 73 0 R ] /Limits [ (section.3) (subsection.4.2) ] >> +endobj +17 0 obj +<< /A << /D (Hfootnote.1) /S /GoTo >> /Border [ 0 0 0 ] /C [ 1 0 0 ] /H /I /Rect [ 205.253 663.404 207.246 692.893 ] /Subtype /Link /Type /Annot >> +endobj +18 0 obj +<< /A << /D (Hfootnote.2) /S /GoTo >> /Border [ 0 0 0 ] /C [ 1 0 0 ] /H /I /Rect [ 328.997 663.404 330.989 692.893 ] /Subtype /Link /Type /Annot >> +endobj +19 0 obj +<< /A << /D (Hfootnote.3) /S /GoTo >> /Border [ 0 0 0 ] /C [ 1 0 0 ] /H /I /Rect [ 479.204 663.404 481.197 692.893 ] /Subtype /Link /Type /Annot >> +endobj +20 0 obj +<< /A << /D (cite.Spiegelhalter;Thomas;Best:2003) /S /GoTo >> /Border [ 0 0 0 ] /C [ 0 1 0 ] /H /I /Rect [ 368.248 348.953 513.996 360.814 ] /Subtype /Link /Type /Annot >> +endobj +21 0 obj +<< /A << /D (cite.Spiegelhalter;Thomas;Best:2003) /S /GoTo >> /Border [ 0 0 0 ] /C [ 0 1 0 ] /H /I /Rect [ 89.004 336.998 113.81 348.858 ] /Subtype /Link /Type /Annot >> +endobj +22 0 obj +<< /A << /D (cite.Spiegelhalter;Thomas;Best:2003) /S /GoTo >> /Border [ 0 0 0 ] /C [ 0 1 0 ] /H /I /Rect [ 114.854 336.998 136.772 348.858 ] /Subtype /Link /Type /Annot >> +endobj +23 0 obj +<< /A << /D (cite.Geman;Geman:1984) /S /GoTo >> /Border [ 0 0 0 ] /C [ 0 1 0 ] /H /I /Rect [ 249.866 325.043 337.866 336.903 ] /Subtype /Link /Type /Annot >> +endobj +24 0 obj +<< /A << /D (cite.Geman;Geman:1984) /S /GoTo >> /Border [ 0 0 0 ] /C [ 0 1 0 ] /H /I /Rect [ 339.814 325.043 361.732 336.903 ] /Subtype /Link /Type /Annot >> +endobj +25 0 obj +<< /A << /D (cite.Gelfand;Smith:1990) /S /GoTo >> /Border [ 0 0 0 ] /C [ 0 1 0 ] /H /I /Rect [ 366.439 325.043 452.407 336.903 ] /Subtype /Link /Type /Annot >> +endobj +26 0 obj +<< /A << /D (cite.Gelfand;Smith:1990) /S /GoTo >> /Border [ 0 0 0 ] /C [ 0 1 0 ] /H /I /Rect [ 454.355 325.043 476.273 336.903 ] /Subtype /Link /Type /Annot >> +endobj +27 0 obj +<< /A << /D (cite.Casella;George:1992) /S /GoTo >> /Border [ 0 0 0 ] /C [ 0 1 0 ] /H /I /Rect [ 480.98 325.043 513.996 336.903 ] /Subtype /Link /Type /Annot >> +endobj +28 0 obj +<< /A << /D (cite.Casella;George:1992) /S /GoTo >> /Border [ 0 0 0 ] /C [ 0 1 0 ] /H /I /Rect [ 89.004 313.088 140.612 324.948 ] /Subtype /Link /Type /Annot >> +endobj +29 0 obj +<< /A << /D (cite.Casella;George:1992) /S /GoTo >> /Border [ 0 0 0 ] /C [ 0 1 0 ] /H /I /Rect [ 141.68 313.088 163.598 324.948 ] /Subtype /Link /Type /Annot >> +endobj +30 0 obj +<< /A << /D (cite.Metropolis;Rosenbluth;Rosenbluth;Teller;Teller:1953) /S /GoTo >> /Border [ 0 0 0 ] /C [ 0 1 0 ] /H /I /Rect [ 303.065 313.088 513.996 324.948 ] /Subtype /Link /Type /Annot >> +endobj +31 0 obj +<< /A << /D (cite.Metropolis;Rosenbluth;Rosenbluth;Teller;Teller:1953) /S /GoTo >> /Border [ 0 0 0 ] /C [ 0 1 0 ] /H /I /Rect [ 89.004 301.133 115.623 312.993 ] /Subtype /Link /Type /Annot >> +endobj +32 0 obj +<< /A << /D (cite.Metropolis;Rosenbluth;Rosenbluth;Teller;Teller:1953) /S /GoTo >> /Border [ 0 0 0 ] /C [ 0 1 0 ] /H /I /Rect [ 116.507 301.133 138.425 312.993 ] /Subtype /Link /Type /Annot >> +endobj +33 0 obj +<< /A << /S /URI /Type /Action /URI (http://www.mrc-bsu.cam.ac.uk/bugs/) >> /Border [ 0 0 0 ] /C [ 0 1 1 ] /H /I /Rect [ 255.993 289.456 435.977 300.575 ] /Subtype /Link /Type /Annot >> +endobj +34 0 obj +<< /A << /D (cite.Gilks;Richardson;Spiegelhalter:1996) /S /GoTo >> /Border [ 0 0 0 ] /C [ 0 1 0 ] /H /I /Rect [ 224.862 277.222 385.348 289.083 ] /Subtype /Link /Type /Annot >> +endobj +35 0 obj +<< /A << /D (cite.Gilks;Richardson;Spiegelhalter:1996) /S /GoTo >> /Border [ 0 0 0 ] /C [ 0 1 0 ] /H /I /Rect [ 390.539 277.222 412.457 289.083 ] /Subtype /Link /Type /Annot >> +endobj +36 0 obj +<< /A << /D (cite.RCore:2004) /S /GoTo >> /Border [ 0 0 0 ] /C [ 0 1 0 ] /H /I /Rect [ 367.32 214.154 486.866 226.014 ] /Subtype /Link /Type /Annot >> +endobj +37 0 obj +<< /A << /D (cite.RCore:2004) /S /GoTo >> /Border [ 0 0 0 ] /C [ 0 1 0 ] /H /I /Rect [ 488.213 214.154 510.131 226.014 ] /Subtype /Link /Type /Annot >> +endobj +38 0 obj +<< /A << /D (cite.gelman:2004) /S /GoTo >> /Border [ 0 0 0 ] /C [ 0 1 0 ] /H /I /Rect [ 369.463 139.13 405.258 150.991 ] /Subtype /Link /Type /Annot >> +endobj +39 0 obj +<< /A << /D (cite.gelman:2004) /S /GoTo >> /Border [ 0 0 0 ] /C [ 0 1 0 ] /H /I /Rect [ 407.056 139.13 428.974 150.991 ] /Subtype /Link /Type /Annot >> +endobj +40 0 obj +<< /Filter /FlateDecode /Length 4387 >> +stream +x\xDA\xCD;َ\xB9\x91\xEF\xFA\x8A\x82Հ\x9ACf2\x8E_,\xC9\xC1ޑ\xE1\x95Z\x98\x87?dUeP\xED\xCA,ɭ5\xE0_߸xdvv\xA9\xBF,u3y\x83qG\x90\xADg\x9B\x99\x9E\xBD}\xA1\xE5\xF7\xEB\xBB?\xFCTꙩTf +;\xBB[\xCF2[\xA9\xD2f\xB3*3\xCAX7\xBB[\xCD~\x9D\xBF\xBF1\xF3\xEC\x97\xFC<\xBE\x86\xDF~\xB8\xF9\xFB\xDD_`\xA9M\x97\x9D\xA9\xDC |
From: <snt...@us...> - 2011-03-21 19:13:34
|
Revision: 181 http://bugs-r.svn.sourceforge.net/bugs-r/?rev=181&view=rev Author: snthomas99 Date: 2011-03-21 19:13:27 +0000 (Mon, 21 Mar 2011) Log Message: ----------- added saveExec and restart features for use with OpenBUGS >3.2.1 Modified Paths: -------------- trunk/R2OpenBUGS/CreatevalidateOpenBUGS.R trunk/R2OpenBUGS/DESCRIPTION trunk/R2OpenBUGS/R/bugs.R trunk/R2OpenBUGS/R/bugs.script.R trunk/R2OpenBUGS/R/print.bugs.R trunk/R2OpenBUGS/inst/NEWS trunk/R2OpenBUGS/inst/validateInstallOpenBUGS/validOpenBUGSResults.R trunk/R2OpenBUGS/man/bugs.Rd trunk/R2OpenBUGS/man/bugs.script.Rd Modified: trunk/R2OpenBUGS/CreatevalidateOpenBUGS.R =================================================================== --- trunk/R2OpenBUGS/CreatevalidateOpenBUGS.R 2011-03-07 15:09:12 UTC (rev 180) +++ trunk/R2OpenBUGS/CreatevalidateOpenBUGS.R 2011-03-21 19:13:27 UTC (rev 181) @@ -25,11 +25,11 @@ ) test.modelfile = paste(test.models,"model.txt",sep="") -test.modelfile<-file.path('C:/Program Files/OpenBUGS/OpenBUGS312/Examples',test.modelfile) +test.modelfile<-file.path('C:/Program Files/OpenBUGS/OpenBUGS321/Examples',test.modelfile) test.datafile = paste(test.models,"data.txt",sep="") -test.datafile<-file.path('C:/Program Files/OpenBUGS/OpenBUGS312/Examples',test.datafile) +test.datafile<-file.path('C:/Program Files/OpenBUGS/OpenBUGS321/Examples',test.datafile) test.inits = paste(test.models,"inits.txt",sep="") -test.inits<-file.path('C:/Program Files/OpenBUGS/OpenBUGS312/Examples',test.inits) +test.inits<-file.path('C:/Program Files/OpenBUGS/OpenBUGS321/Examples',test.inits) ### Test for posterior means within 1 percent of previously saved values Modified: trunk/R2OpenBUGS/DESCRIPTION =================================================================== --- trunk/R2OpenBUGS/DESCRIPTION 2011-03-07 15:09:12 UTC (rev 180) +++ trunk/R2OpenBUGS/DESCRIPTION 2011-03-21 19:13:27 UTC (rev 181) @@ -1,7 +1,7 @@ Package: R2OpenBUGS Title: Running OpenBUGS from R / S-PLUS -Date: 2010-09-30 -Version: 3.1-2 +Date: 2011-03-01 +Version: 3.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...>. @@ -12,9 +12,8 @@ it is possible to call a BUGS model, summarize inferences and convergence in a table and graph, and save the simulations in arrays for easy access in R / S-PLUS. -Depends: R (>= 2.9.2), coda (>= 0.11-0) -SystemRequirements: OpenBUGS >=3.1 -URL: http://www.stat.columbia.edu/~gelman/bugsR/ +Depends: R (>= 2.10.1), coda (>= 0.11-0) +SystemRequirements: OpenBUGS >=3.2.1 Maintainer: Uwe Ligges <li...@st...> License: GPL-2 Dialect: R, S-PLUS Modified: trunk/R2OpenBUGS/R/bugs.R =================================================================== --- trunk/R2OpenBUGS/R/bugs.R 2011-03-07 15:09:12 UTC (rev 180) +++ trunk/R2OpenBUGS/R/bugs.R 2011-03-21 19:13:27 UTC (rev 181) @@ -1,11 +1,12 @@ "bugs" <- -function(data, inits, parameters.to.save, n.iter, model.file="model.bug", +function(data, inits, parameters.to.save, n.iter, model.file="model.txt", n.chains=3, n.burnin=floor(n.iter / 2), n.thin=1, + saveExec=FALSE,restart=FALSE, debug=FALSE, DIC=TRUE, digits=5, codaPkg=FALSE, OpenBUGS.pgm=ifelse(.Platform$OS.type == "windows" | useWINE==TRUE, paste("C:/Program Files/OpenBUGS/OpenBUGS", version,"/OpenBUGS.exe",sep=""),"OpenBUGS"), - version='312', + version='321', working.directory=NULL, clearWD=FALSE, useWINE=FALSE, WINE=NULL, newWINE=TRUE, WINEPATH=NULL, bugs.seed=1, summary.only=FALSE, @@ -36,6 +37,11 @@ if(! bugs.seed %in% c(1:14))stop("OpenBUGS seed must be integer in 1-14") + if(!is.function(model.file) && + length(grep("\\.bug", tolower(model.file))))stop("model.file must be renamed with .txt rather than .bug") + + if(is.null(working.directory) && (saveExec || restart))stop("The working directory must be specified when saveExec or restart is TRUE") + if(!is.null(working.directory)) { working.directory <- path.expand(working.directory) savedWD <- getwd() @@ -120,7 +126,7 @@ } if(DIC) parameters.to.save <- c(parameters.to.save, "deviance") - ## Model files with extension ".bug" need to be renamed to ".txt" + ## Model files must have extension ".txt" if(!length(grep("\\.txt$", tolower(model.file)))) { new.model.file <- paste(basename(model.file), ".txt", sep="") if(!is.null(working.directory)) new.model.file <- file.path(working.directory, new.model.file) @@ -129,11 +135,18 @@ } else { new.model.file <- model.file } + + ## Create a filename model.file + .bug + model.file.bug<-gsub('\\.txt','.bug',basename(new.model.file)) + + if(restart && !file.exists(model.file.bug))stop("The .bug restart file was not found in the working directory") + if(useWINE){ ## Some tweaks for wine (particularly required for Mac OS) new.model.file <- gsub("//", "/", new.model.file) } bugs.script(parameters.to.save, n.chains, n.iter, n.burnin, n.thin, + saveExec,restart,model.file.bug, new.model.file, debug=debug, is.inits=!is.null(inits), DIC=DIC, useWINE=useWINE, newWINE=newWINE, WINEPATH=WINEPATH, bugs.seed=bugs.seed, Modified: trunk/R2OpenBUGS/R/bugs.script.R =================================================================== --- trunk/R2OpenBUGS/R/bugs.script.R 2011-03-07 15:09:12 UTC (rev 180) +++ trunk/R2OpenBUGS/R/bugs.script.R 2011-03-21 19:13:27 UTC (rev 181) @@ -1,6 +1,7 @@ "bugs.script" <- function(parameters.to.save, n.chains, n.iter, n.burnin, - n.thin, model.file, debug=FALSE, is.inits, + n.thin, saveExec, restart, model.file.bug, + model.file, debug=FALSE, is.inits, DIC=FALSE, useWINE=FALSE, newWINE=TRUE, WINEPATH=NULL, bugs.seed=NULL, summary.only=FALSE, save.history=(.Platform$OS.type == "windows" | useWINE==TRUE), @@ -26,6 +27,9 @@ coda <- file.path(working.directory, "/") coda <- native2win(coda, useWINE=useWINE, newWINE=newWINE, WINEPATH=WINEPATH) + model.file.bug<-file.path(working.directory,model.file.bug) + model.file.bug<-native2win(model.file.bug, useWINE=useWINE, newWINE=newWINE, WINEPATH=WINEPATH) + logFile <- file.path(working.directory, "log.odc") logFile <- native2win(logFile, useWINE=useWINE, newWINE=newWINE, WINEPATH=WINEPATH) logFileTxt <- file.path(working.directory, "log.txt") @@ -51,30 +55,40 @@ cat( if(.Platform$OS.type == "windows" | useWINE) "modelDisplay('log')\n", - "modelCheck('", model, "')\n", - "modelData('", data, "')\n", - "modelCompile(", n.chains, ")\n", - bugs.seed.cmd, - if(is.inits) initlist, - "modelGenInits()\n", - if(over.relax) 'over.relax("yes")\n', + if(restart)c("modelInternalize('", model.file.bug, "')\n"), + if(restart && n.burnin>0)c( + "samplesClear('*')\n", + "summaryClear('*')\n" + ), + if(!restart)c( + "modelCheck('", model, "')\n", + "modelData('", data, "')\n", + "modelCompile(", n.chains, ")\n" + ), + if(!restart)bugs.seed.cmd, + if(!restart && is.inits) initlist, + if(!restart)"modelGenInits()\n", + if(!restart && over.relax) 'over.relax("yes")\n', + if((!restart) || (n.burnin>0))c( thinUpdate, savelist, - summarylist, - if(DIC) "dicSet()\n", + summarylist + ), + if(((!restart) || (n.burnin>0)) && DIC) "dicSet()\n", "modelUpdate(", formatC(n.iter-n.burnin, format='d'), ",", n.thin, ",",formatC(n.iter-n.burnin, format='d'),")\n", "samplesCoda('*', '", coda, "')\n", "summaryStats('*')\n", if(DIC) "dicStats()\n", if (save.history) "samplesHistory('*')\n", + if(saveExec)c("modelExternalize('",model.file.bug,"')\n"), if(.Platform$OS.type == "windows" | useWINE) c("modelSaveLog('", logFile, "')\n", "modelSaveLog('", logFileTxt, "')\n"), file=script, sep="", append=FALSE) - if(!debug) cat("modelQuit('y')\n", file=script, append=TRUE) + if(!debug) cat("modelQuit('y')\n", file=script, append=TRUE) - sims.files <- paste(coda, "CODAchain", 1:n.chains, ".txt", sep="") + sims.files <- paste("CODAchain", 1:n.chains, ".txt", sep="") for(i in 1:n.chains) cat("OpenBUGS did not run correctly.\n", file=sims.files[i], append=FALSE) } Modified: trunk/R2OpenBUGS/R/print.bugs.R =================================================================== --- trunk/R2OpenBUGS/R/print.bugs.R 2011-03-07 15:09:12 UTC (rev 180) +++ trunk/R2OpenBUGS/R/print.bugs.R 2011-03-21 19:13:27 UTC (rev 181) @@ -7,10 +7,10 @@ cat("Inference for Bugs model at \"", x$model.file, "\", ", sep="") if(!is.null(x$program)) cat("fit using ", x$program, ",", sep="") - cat("\n ", x$n.chains, " chains, each with ", x$n.iter, + cat("\nCurrent: ", x$n.chains, " chains, each with ", x$n.iter, " iterations (first ", x$n.burnin, " discarded)", sep = "") if(x$n.thin > 1) cat(", n.thin =", x$n.thin) - cat("\n n.sims =", x$n.sims, "iterations saved\n") + cat("\nCumulative: n.sims =", x$n.sims, "iterations saved\n") print(round(x$summary, digits.summary), ...) if(x$n.chains > 1) { Modified: trunk/R2OpenBUGS/inst/NEWS =================================================================== --- trunk/R2OpenBUGS/inst/NEWS 2011-03-07 15:09:12 UTC (rev 180) +++ trunk/R2OpenBUGS/inst/NEWS 2011-03-21 19:13:27 UTC (rev 181) @@ -1,6 +1,15 @@ Changes to R2OpenBUGS: ====================== +Update 3.2-1 +- Added saveExec and restart options to the bugs function that uses + the OpenBUGS internalize/externalize feature to allow a user to + store the state of the OpenBUGS execution and continue + execution after checking results in R. + +Update 3.1-2.1 +- Corrected bug in WINE execution + Update 3.1-2 - Set default version of OpenBUGS to 3.1.2 - Fixed upper/lower case error in read.bugs Modified: trunk/R2OpenBUGS/inst/validateInstallOpenBUGS/validOpenBUGSResults.R =================================================================== --- trunk/R2OpenBUGS/inst/validateInstallOpenBUGS/validOpenBUGSResults.R 2011-03-07 15:09:12 UTC (rev 180) +++ trunk/R2OpenBUGS/inst/validateInstallOpenBUGS/validOpenBUGSResults.R 2011-03-21 19:13:27 UTC (rev 181) @@ -20,116 +20,111 @@ 53.13, 55.19025, 60.39, 59.36), .Dim = c(10L, 7L), .Dimnames = list( c("alpha", "beta", "rhat[1]", "rhat[2]", "rhat[3]", "rhat[4]", "rhat[5]", "rhat[6]", "rhat[7]", "rhat[8]"), c("mean", "sd", - "2.5%", "25%", "50%", "75%", "97.5%"))), structure(c(106.56037, -6.18615, 6.15259, 2.34291, 0.10596, 0.47872, 101.9, 5.977, 5.304, -105, 6.117, 5.817, 106.5, 6.187, 6.1185, 108.1, 6.255, 6.452, -111.1025, 6.397, 7.177), .Dim = c(3L, 7L), .Dimnames = list(c("mu.beta[1]", + "2.5%", "25%", "50%", "75%", "97.5%"))), structure(c(106.56034, +6.18619, 6.15206, 2.34366, 0.10595, 0.47828, 101.9, 5.976, 5.30397, +105, 6.117, 5.818, 106.5, 6.187, 6.118, 108.1, 6.254, 6.451, +111.2, 6.397, 7.18002), .Dim = c(3L, 7L), .Dimnames = list(c("mu.beta[1]", "mu.beta[2]", "sigma"), c("mean", "sd", "2.5%", "25%", "50%", -"75%", "97.5%"))), structure(c(3.2445, 0.02929, 0.02929, 3.20989, -0.0081, 0.85113, -0.00963, -0.00963, 0.86281, 2.1011, 2.50802, -2.50802, 2.13451, 0.65922, 0.50825, 0.71045, 0.71045, 0.50962, -1.14395, -4.77203, -4.77203, 1.101, -0.9073, 0.22139, -1.40502, --1.40502, 0.2234, 1.926, -1.638, -1.638, 1.917, -0.66862, 0.49587, --0.48102, -0.48102, 0.50065, 2.6875, 0.04017, 0.04017, 2.663, -0.01868, 0.7305, -0.00773, -0.00773, 0.74375, 3.89225, 1.715, -1.715, 3.82125, 0.68585, 1.07, 0.4545, 0.4545, 1.10125, 8.5671, -4.82202, 4.82202, 8.5781, 0.9098, 2.13205, 1.40205, 1.40205, -2.18202), .Dim = c(9L, 7L), .Dimnames = list(c("Sigma2[1,1]", -"Sigma2[1,2]", "Sigma2[2,1]", "Sigma2[2,2]", "rho", "tau[1,1]", -"tau[1,2]", "tau[2,1]", "tau[2,2]"), c("mean", "sd", "2.5%", -"25%", "50%", "75%", "97.5%"))), structure(c(1.85767, 2.64973, -0.96989, 0.86209, 0.09887, 0.26392, 0.07107, 0.07684, 0.03153, -0.0148, 1.323, 2.528, 0.8224, 0.7898, 0.07502, 1.701, 2.604, -0.9188, 0.8457, 0.08841, 1.854, 2.642, 0.9689, 0.8646, 0.09723, -2.026, 2.691, 1.018, 0.8836, 0.1074, 2.36802, 2.802, 1.122, 0.9144, -0.1326), .Dim = c(5L, 7L), .Dimnames = list(c("U3", "alpha", -"beta", "gamma", "sigma"), c("mean", "sd", "2.5%", "25%", "50%", -"75%", "97.5%"))), structure(c(2399.81116, 2970.23731, 1526.76347, -9152.71052, 1072.50035, 22.42927, 0.01173, 1559, 1483, 573.04999, -2217, 1515, 1388.49991, 2748, 1526, 2769.24997, 3466, 1539, 10140.49952, -5596.37451, 1570), .Dim = c(3L, 7L), .Dimnames = list(c("sigma2.btw", -"sigma2.with", "theta"), c("mean", "sd", "2.5%", "25%", "50%", -"75%", "97.5%"))), structure(c(0.99767, 1.43476, -0.00865, -0.1804, -0.11034, 0.1406, 0.99274, 0.04825, 0.0552, 0.05217, 0.05175, -0.03333, 0.05436, 0.05185, 1, 1.327, -0.113, -0.2831, 0.06521, -0.04439, 0.8931, 1, 1.4, -0.04039, -0.2121, 0.08657, 0.1057, -0.9604, 1, 1.435, -0.00813, -0.1808, 0.1033, 0.1356, 0.9919, -1, 1.469, 0.02322, -0.1495, 0.12722, 0.169, 1.023, 1, 1.544, -0.0942, -0.07637, 0.1929, 0.2663, 1.099), .Dim = c(7L, 7L), .Dimnames = list( - c("equiv", "mu", "phi", "pi", "sigma1", "sigma2", "theta" - ), c("mean", "sd", "2.5%", "25%", "50%", "75%", "97.5%"))), - structure(c(0.6029, 0.3971, 536.75923, 548.90934, 3.75937, - 0.08421, 0.08421, 0.92221, 1.21365, 0.6111, 0.4326, 0.2359, - 535.1, 546.5, 2.917, 0.54737, 0.34, 536.2, 548.2, 3.36175, - 0.6039, 0.3961, 536.7, 548.9, 3.654, 0.66, 0.45262, 537.3, - 549.7, 4.019, 0.7641, 0.5674, 538.6, 551.2, 5.27107), .Dim = c(5L, - 7L), .Dimnames = list(c("P[1]", "P[2]", "lambda[1]", "lambda[2]", - "sigma"), c("mean", "sd", "2.5%", "25%", "50%", "75%", "97.5%" - ))), structure(c(2.99564, 0.79689, 1.02513, 0.56926, 0.39621, - 0.72729, 1.914, 0.04475, 0.4099, 2.743, 0.6218, 0.625, 2.997, - 0.7995, 0.82675, 3.255, 0.9782, 1.16825, 4.08502, 1.541, - 2.82), .Dim = c(3L, 7L), .Dimnames = list(c("alpha", "beta", - "sigma"), c("mean", "sd", "2.5%", "25%", "50%", "75%", "97.5%" - ))), structure(c(5.26374, 2.19866, -5.88024, 0.25869, 0.27042, - 0.2265, 7.82296, 0.1335, 0.16648, 0.14127, 0.11614, 0.137, - 0.1076, 1.18539, 4.996, 1.87997, -6.165, 0.1277, 0.1201, - 0.1085, 5.90897, 5.187, 2.094, -5.964, 0.1849, 0.1843, 0.1586, - 6.984, 5.264, 2.197, -5.879, 0.2318, 0.24, 0.2008, 7.684, - 5.342, 2.3, -5.795, 0.2995, 0.3184, 0.26312, 8.521, 5.529, - 2.535, -5.603, 0.54651, 0.6038, 0.495, 10.5), .Dim = c(7L, - 7L), .Dimnames = list(c("mu[1]", "mu[2]", "mu[3]", "sigma[1]", - "sigma[2]", "sigma[3]", "sigmaC"), c("mean", "sd", "2.5%", - "25%", "50%", "75%", "97.5%"))), structure(c(106.61227, 6.18568, - 6.0953, 3.63673, 0.1075, 0.46858, 99.40975, 5.97597, 5.27197, - 104.2, 6.114, 5.776, 106.6, 6.187, 6.058, 109.1, 6.258, 6.386, - 113.6, 6.394, 7.106), .Dim = c(3L, 7L), .Dimnames = list( - c("alpha0", "beta.c", "sigma"), c("mean", "sd", "2.5%", - "25%", "50%", "75%", "97.5%"))), structure(c(0.71462, - 1.2978, -0.15277, -39.85965, 0.0106, 0.05567, 0.3192, 0.0106, - 0.05567, 0.3192, 0.0106, 0.05567, 0.3192, 3.38943, 0.14307, - 0.38863, 0.16594, 12.71407, 0.10241, 0.22928, 0.46618, 0.10241, - 0.22928, 0.46618, 0.10241, 0.22928, 0.46618, 0.62795, 0.43279, - 0.529, -0.4842, -65.22025, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2.417, - 0.62217, 1.049, -0.26012, -48.11, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2.945, 0.7155, 1.294, -0.15245, -39.96, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3.299, 0.8063, 1.545, -0.04546, -31.5775, 0, - 0, 1, 0, 0, 1, 0, 0, 1, 3.742, 0.9984, 2.076, 0.1763, -14.38925, - 0, 1, 1, 0, 1, 1, 0, 1, 1, 4.84702), .Dim = c(14L, 7L), .Dimnames = list( - c("b[1]", "b[2]", "b[3]", "b0", "outlier[3]", "outlier[4]", - "outlier[21]", "outlier[3]", "outlier[4]", "outlier[21]", - "outlier[3]", "outlier[4]", "outlier[21]", "sigma"), - c("mean", "sd", "2.5%", "25%", "50%", "75%", "97.5%"))), - structure(c(0.02054, 0.12633, 0.07461, 0.05794, 0.04233, - 0.07062, 0.06659, 0.14758, 0.07197, 0.09058, 0.11631, 0.06903, - 0.01981, 0.0272, 0.02389, 0.00813, 0.01381, 0.01821, 0.02022, - 0.02414, 0.01787, 0.02864, 0.01984, 0.01339, 0.00053, 0.07787, - 0.03467, 0.04313, 0.01952, 0.03927, 0.03268, 0.1034, 0.04114, - 0.0432, 0.08016, 0.04533, 0.00614, 0.107, 0.0575, 0.05223, - 0.03235, 0.05768, 0.05224, 0.1307, 0.05927, 0.06978, 0.1024, - 0.05962, 0.01446, 0.1246, 0.07216, 0.0576, 0.04099, 0.06919, - 0.06439, 0.1463, 0.07056, 0.08795, 0.1156, 0.06826, 0.02884, - 0.1438, 0.08924, 0.06318, 0.05081, 0.08204, 0.07907, 0.1635, - 0.08303, 0.1081, 0.1293, 0.07747, 0.07305, 0.1833, 0.1272, - 0.07477, 0.073, 0.1104, 0.1108, 0.1976, 0.1112, 0.1544, 0.1578, - 0.09787), .Dim = c(12L, 7L), .Dimnames = list(c("p[1]", "p[2]", - "p[3]", "p[4]", "p[5]", "p[6]", "p[7]", "p[8]", "p[9]", "p[10]", - "p[11]", "p[12]"), c("mean", "sd", "2.5%", "25%", "50%", - "75%", "97.5%"))), structure(c(0.05312, 0.10302, 0.07048, - 0.05924, 0.05155, 0.06905, 0.06683, 0.12337, 0.07011, 0.07828, - 0.10214, 0.06848, 0.07268, 0.40333, 0.01954, 0.02166, 0.01741, - 0.00786, 0.01312, 0.01486, 0.01593, 0.02261, 0.01464, 0.01993, - 0.01758, 0.01165, 0.0101, 0.1541, 0.01824, 0.06663, 0.03985, - 0.04467, 0.02805, 0.04259, 0.03845, 0.08327, 0.04392, 0.04419, - 0.07166, 0.04744, 0.05319, 0.1655, 0.03923, 0.08746, 0.05844, - 0.05381, 0.04215, 0.0587, 0.05584, 0.1072, 0.06004, 0.06443, - 0.08969, 0.06035, 0.06617, 0.2989, 0.05219, 0.101, 0.06913, - 0.05897, 0.05093, 0.0683, 0.06577, 0.1217, 0.06922, 0.07633, - 0.1009, 0.06796, 0.07253, 0.3818, 0.0656, 0.1163, 0.08104, - 0.06431, 0.06019, 0.07812, 0.07685, 0.1379, 0.07919, 0.08994, - 0.1132, 0.07595, 0.07898, 0.48342, 0.09467, 0.1511, 0.1088, - 0.07536, 0.07873, 0.101, 0.1011, 0.1716, 0.1015, 0.1226, - 0.1401, 0.09301, 0.09334, 0.76511), .Dim = c(14L, 7L), .Dimnames = list( - c("p[1]", "p[2]", "p[3]", "p[4]", "p[5]", "p[6]", "p[7]", - "p[8]", "p[9]", "p[10]", "p[11]", "p[12]", "pop.mean", - "sigma"), c("mean", "sd", "2.5%", "25%", "50%", "75%", - "97.5%")))) +"75%", "97.5%"))), structure(c(3.199, 0.11791, 0.11791, 3.22327, +0.03519, 0.84975, -0.03162, -0.03162, 0.84991, 2.0602, 2.46612, +2.46612, 2.13682, 0.65527, 0.50303, 0.69675, 0.69675, 0.50508, +1.13, -4.57602, -4.57602, 1.11997, -0.9017, 0.22159, -1.38405, +-1.38405, 0.2153, 1.93675, -1.571, -1.571, 1.921, -0.65055, 0.4941, +-0.49565, -0.49565, 0.4931, 2.663, 0.23045, 0.23045, 2.662, 0.10835, +0.7321, -0.04676, -0.04676, 0.73415, 3.804, 1.777, 1.777, 3.848, +0.6978, 1.08225, 0.4324, 0.4324, 1.079, 8.43205, 4.69405, 4.69405, +8.66835, 0.9054, 2.13005, 1.346, 1.346, 2.16), .Dim = c(9L, 7L +), .Dimnames = list(c("Sigma2[1,1]", "Sigma2[1,2]", "Sigma2[2,1]", +"Sigma2[2,2]", "rho", "tau[1,1]", "tau[1,2]", "tau[2,1]", "tau[2,2]" +), c("mean", "sd", "2.5%", "25%", "50%", "75%", "97.5%"))), structure(c(1.85767, +2.64973, 0.96989, 0.86209, 0.09887, 0.26392, 0.07107, 0.07684, +0.03153, 0.0148, 1.323, 2.528, 0.8224, 0.7898, 0.07502, 1.701, +2.604, 0.9188, 0.8457, 0.08841, 1.854, 2.642, 0.9689, 0.8646, +0.09723, 2.026, 2.691, 1.018, 0.8836, 0.1074, 2.36802, 2.802, +1.122, 0.9144, 0.1326), .Dim = c(5L, 7L), .Dimnames = list(c("U3", +"alpha", "beta", "gamma", "sigma"), c("mean", "sd", "2.5%", "25%", +"50%", "75%", "97.5%"))), structure(c(2399.81116, 2970.23731, +1526.76347, 9152.71052, 1072.50035, 22.42927, 0.01173, 1559, +1483, 573.04999, 2217, 1515, 1388.49991, 2748, 1526, 2769.24997, +3466, 1539, 10140.49952, 5596.37451, 1570), .Dim = c(3L, 7L), .Dimnames = list( + c("sigma2.btw", "sigma2.with", "theta"), c("mean", "sd", + "2.5%", "25%", "50%", "75%", "97.5%"))), structure(c(0.99767, +1.43476, -0.00865, -0.1804, 0.11034, 0.1406, 0.99274, 0.04825, +0.0552, 0.05217, 0.05175, 0.03333, 0.05436, 0.05185, 1, 1.327, +-0.113, -0.2831, 0.06521, 0.04439, 0.8931, 1, 1.4, -0.04039, +-0.2121, 0.08657, 0.1057, 0.9604, 1, 1.435, -0.00813, -0.1808, +0.1033, 0.1356, 0.9919, 1, 1.469, 0.02322, -0.1495, 0.12722, +0.169, 1.023, 1, 1.544, 0.0942, -0.07637, 0.1929, 0.2663, 1.099 +), .Dim = c(7L, 7L), .Dimnames = list(c("equiv", "mu", "phi", +"pi", "sigma1", "sigma2", "theta"), c("mean", "sd", "2.5%", "25%", +"50%", "75%", "97.5%"))), structure(c(0.6029, 0.3971, 536.75923, +548.90934, 3.75937, 0.08421, 0.08421, 0.92221, 1.21365, 0.6111, +0.4326, 0.2359, 535.1, 546.5, 2.917, 0.54737, 0.34, 536.2, 548.2, +3.36175, 0.6039, 0.3961, 536.7, 548.9, 3.654, 0.66, 0.45262, +537.3, 549.7, 4.019, 0.7641, 0.5674, 538.6, 551.2, 5.27107), .Dim = c(5L, +7L), .Dimnames = list(c("P[1]", "P[2]", "lambda[1]", "lambda[2]", +"sigma"), c("mean", "sd", "2.5%", "25%", "50%", "75%", "97.5%" +))), structure(c(2.99564, 0.79689, 1.02513, 0.56926, 0.39621, +0.72729, 1.914, 0.04475, 0.4099, 2.743, 0.6218, 0.625, 2.997, +0.7995, 0.82675, 3.255, 0.9782, 1.16825, 4.08502, 1.541, 2.82 +), .Dim = c(3L, 7L), .Dimnames = list(c("alpha", "beta", "sigma" +), c("mean", "sd", "2.5%", "25%", "50%", "75%", "97.5%"))), structure(c(5.26188, +2.19814, -5.8793, 0.25999, 0.26441, 0.22576, 7.8008, 0.13613, +0.16157, 0.14278, 0.11727, 0.12765, 0.10712, 1.17804, 4.991, +1.883, -6.17302, 0.1279, 0.11789, 0.1088, 5.88897, 5.185, 2.09675, +-5.964, 0.1859, 0.18, 0.1573, 6.964, 5.263, 2.195, -5.877, 0.2326, +0.2333, 0.1999, 7.6745, 5.34, 2.296, -5.79, 0.30132, 0.3123, +0.263, 8.483, 5.527, 2.525, -5.61, 0.55141, 0.59261, 0.492, 10.46 +), .Dim = c(7L, 7L), .Dimnames = list(c("mu[1]", "mu[2]", "mu[3]", +"sigma[1]", "sigma[2]", "sigma[3]", "sigmaC"), c("mean", "sd", +"2.5%", "25%", "50%", "75%", "97.5%"))), structure(c(106.61227, +6.18568, 6.0953, 3.63673, 0.1075, 0.46858, 99.40975, 5.97597, +5.27197, 104.2, 6.114, 5.776, 106.6, 6.187, 6.058, 109.1, 6.258, +6.386, 113.6, 6.394, 7.106), .Dim = c(3L, 7L), .Dimnames = list( + c("alpha0", "beta.c", "sigma"), c("mean", "sd", "2.5%", "25%", + "50%", "75%", "97.5%"))), structure(c(0.71462, 1.2978, -0.15277, +-39.85965, 0.0106, 0.05567, 0.3192, 0.0106, 0.05567, 0.3192, +0.0106, 0.05567, 0.3192, 3.38943, 0.14307, 0.38863, 0.16594, +12.71407, 0.10241, 0.22928, 0.46618, 0.10241, 0.22928, 0.46618, +0.10241, 0.22928, 0.46618, 0.62795, 0.43279, 0.529, -0.4842, +-65.22025, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2.417, 0.62217, 1.049, +-0.26012, -48.11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2.945, 0.7155, 1.294, +-0.15245, -39.96, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3.299, 0.8063, 1.545, +-0.04546, -31.5775, 0, 0, 1, 0, 0, 1, 0, 0, 1, 3.742, 0.9984, +2.076, 0.1763, -14.38925, 0, 1, 1, 0, 1, 1, 0, 1, 1, 4.84702), .Dim = c(14L, +7L), .Dimnames = list(c("b[1]", "b[2]", "b[3]", "b0", "outlier[3]", +"outlier[4]", "outlier[21]", "outlier[3]", "outlier[4]", "outlier[21]", +"outlier[3]", "outlier[4]", "outlier[21]", "sigma"), c("mean", +"sd", "2.5%", "25%", "50%", "75%", "97.5%"))), structure(c(0.02054, +0.12633, 0.07461, 0.05794, 0.04233, 0.07062, 0.06659, 0.14758, +0.07197, 0.09058, 0.11631, 0.06903, 0.01981, 0.0272, 0.02389, +0.00813, 0.01381, 0.01821, 0.02022, 0.02414, 0.01787, 0.02864, +0.01984, 0.01339, 0.00053, 0.07787, 0.03467, 0.04313, 0.01952, +0.03927, 0.03268, 0.1034, 0.04114, 0.0432, 0.08016, 0.04533, +0.00614, 0.107, 0.0575, 0.05223, 0.03235, 0.05768, 0.05224, 0.1307, +0.05927, 0.06978, 0.1024, 0.05962, 0.01446, 0.1246, 0.07216, +0.0576, 0.04099, 0.06919, 0.06439, 0.1463, 0.07056, 0.08795, +0.1156, 0.06826, 0.02884, 0.1438, 0.08924, 0.06318, 0.05081, +0.08204, 0.07907, 0.1635, 0.08303, 0.1081, 0.1293, 0.07747, 0.07305, +0.1833, 0.1272, 0.07477, 0.073, 0.1104, 0.1108, 0.1976, 0.1112, +0.1544, 0.1578, 0.09787), .Dim = c(12L, 7L), .Dimnames = list( + c("p[1]", "p[2]", "p[3]", "p[4]", "p[5]", "p[6]", "p[7]", + "p[8]", "p[9]", "p[10]", "p[11]", "p[12]"), c("mean", "sd", + "2.5%", "25%", "50%", "75%", "97.5%"))), structure(c(0.05312, +0.10302, 0.07048, 0.05924, 0.05155, 0.06905, 0.06683, 0.12337, +0.07011, 0.07828, 0.10214, 0.06848, 0.07268, 0.40333, 0.01954, +0.02166, 0.01741, 0.00786, 0.01312, 0.01486, 0.01593, 0.02261, +0.01464, 0.01993, 0.01758, 0.01165, 0.0101, 0.1541, 0.01824, +0.06663, 0.03985, 0.04467, 0.02805, 0.04259, 0.03845, 0.08327, +0.04392, 0.04419, 0.07166, 0.04744, 0.05319, 0.1655, 0.03923, +0.08746, 0.05844, 0.05381, 0.04215, 0.0587, 0.05584, 0.1072, +0.06004, 0.06443, 0.08969, 0.06035, 0.06617, 0.2989, 0.05219, +0.101, 0.06913, 0.05897, 0.05093, 0.0683, 0.06577, 0.1217, 0.06922, +0.07633, 0.1009, 0.06796, 0.07253, 0.3818, 0.0656, 0.1163, 0.08104, +0.06431, 0.06019, 0.07812, 0.07685, 0.1379, 0.07919, 0.08994, +0.1132, 0.07595, 0.07898, 0.48342, 0.09467, 0.1511, 0.1088, 0.07536, +0.07873, 0.101, 0.1011, 0.1716, 0.1015, 0.1226, 0.1401, 0.09301, +0.09334, 0.76511), .Dim = c(14L, 7L), .Dimnames = list(c("p[1]", +"p[2]", "p[3]", "p[4]", "p[5]", "p[6]", "p[7]", "p[8]", "p[9]", +"p[10]", "p[11]", "p[12]", "pop.mean", "sigma"), c("mean", "sd", +"2.5%", "25%", "50%", "75%", "97.5%")))) Modified: trunk/R2OpenBUGS/man/bugs.Rd =================================================================== --- trunk/R2OpenBUGS/man/bugs.Rd 2011-03-07 15:09:12 UTC (rev 180) +++ trunk/R2OpenBUGS/man/bugs.Rd 2011-03-21 19:13:27 UTC (rev 181) @@ -7,13 +7,14 @@ saves the simulations for easy access in \R or S-PLUS.} \usage{ -bugs(data, inits, parameters.to.save, n.iter, model.file="model.bug", +bugs(data, inits, parameters.to.save, n.iter, model.file="model.txt", n.chains=3, n.burnin=floor(n.iter / 2), n.thin=1, + saveExec=FALSE,restart=FALSE, debug=FALSE, DIC=TRUE, digits=5, codaPkg=FALSE, OpenBUGS.pgm=ifelse(.Platform$OS.type == "windows" | useWINE==TRUE, paste("C:/Program Files/OpenBUGS/OpenBUGS", version,"/OpenBUGS.exe",sep=""),"OpenBUGS"), - version='312', + version='321', working.directory=NULL, clearWD=FALSE, useWINE=FALSE, WINE=NULL, newWINE=TRUE, WINEPATH=NULL, bugs.seed=1, summary.only=FALSE, @@ -37,12 +38,12 @@ e.g. by the function \code{\link{bugs.inits}}.} \item{parameters.to.save}{character vector of the names of the parameters to save which should be monitored} - \item{model.file}{file containing the model written in \pkg{OpenBUGS} code. - The extension can be either \file{.bug} or \file{.txt}. - If the extension is \file{.bug} and \code{program=="OpenBUGS"}, - a copy of the file with extension \file{.txt} will be created - in the \code{bugs()} call and removed afterwards. Note that - similarly named \file{.txt} files will be overwritten. + \item{model.file}{File containing the model written in \pkg{OpenBUGS} code. + The extension must be \file{.txt}. + The old convention allowing model.file to be named \file{.bug} has been eliminated + because the new \pkg{OpenBUGS} feature that allows the program image + to be saved and later restarted uses the .bug extension for the saved + images. Alternatively, \code{model.file} can be an R function that contains a BUGS model that is written to a temporary model file (see \code{\link{tempfile}}) using \code{\link{write.model}}.} \item{n.chains}{number of Markov chains (default: 3)} @@ -57,6 +58,22 @@ \code{n.iter}. Setting \code{n.thin}=2, doubles the number of iterations OpenBUGS performs, but does not change \code{n.iter} or \code{n.burnin}. Thinning implemented in this manner is not captured in summaries created by packages such as \pkg{coda}.} + \item{saveExec}{If TRUE, a re-startable image of the OpenBUGS execution is + saved with \code{basename(model.file)} and extension .bug in the working + directory, which must be specified. The .bug files can be large, so + users should monitor them carefully and remove them when not needed. +} + \item{restart}{If TRUE, execution resumes with the final status from + the previous execution stored in the .bug file in the working directory. + If \code{n.burnin=0},additional iterations are performed and all iterations since + the previous burnin are used (including those from past executions). If + \code{n.burnin>0}, a new burnin is performed, and the previous iterations are + discarded, but execution continues from the status at the end of the previous + execution. When \code{restart=TRUE}, only \code{n.burnin}, \code{n.iter}, + and \code{saveExec} inputs + should be changed from the call creating the .bug file, otherwise + failed or erratic results may be produced. Note the default has \code{n.burnin>0}. +} \item{debug}{if \code{FALSE} (default), \pkg{OpenBUGS} is closed automatically when the script has finished running, otherwise \pkg{OpenBUGS} remains open for further investigation. The debug option is not available for linux execution.} Modified: trunk/R2OpenBUGS/man/bugs.script.Rd =================================================================== --- trunk/R2OpenBUGS/man/bugs.script.Rd 2011-03-07 15:09:12 UTC (rev 180) +++ trunk/R2OpenBUGS/man/bugs.script.Rd 2011-03-21 19:13:27 UTC (rev 181) @@ -8,7 +8,8 @@ \usage{ bugs.script(parameters.to.save, n.chains, n.iter, n.burnin, - n.thin, model.file, debug=FALSE, is.inits, + n.thin, saveExec, restart, model.file.bug, + model.file, debug=FALSE, is.inits, DIC=FALSE, useWINE=FALSE, newWINE=TRUE, WINEPATH=NULL, bugs.seed=NULL, summary.only=FALSE, save.history=(.Platform$OS.type == "windows" | useWINE==TRUE), @@ -21,6 +22,26 @@ \item{n.iter}{number of total iterations (including burn in)} \item{n.burnin}{length of burn in} \item{n.thin}{thinning parameter} + \item{saveExec}{If TRUE, a re-startable image of the OpenBUGS execution is + saved with \code{basename(model.file)} and extension .bug in the working + directory, which must be specified. The .bug files can be large, so + users should monitor them carefully and remove them when not needed. +} + \item{restart}{If TRUE, execution resumes with the final status from + the previous execution stored in the .bug file in the working directory. + If \code{n.burnin=0},additional iterations are performed and all iterations since + the previous burnin are used (including those from past executions). If + \code{n.burnin>0}, a new burnin is performed, and the previous iterations are + discarded, but execution continues from the status at the end of the previous + execution. When \code{restart=TRUE}, only \code{n.burnin}, \code{n.iter}, + and \code{saveExec} inputs + should be changed from the call creating the .bug file, otherwise + failed or erratic results may be produced. +} + \item{model.file.bug}{If saveExec or restart is TRUE, then \code{model.file.bug} + receives/contains the OpenBUGS program image for restarting the program. + \code{model.file.bug} is the name of the file with its full path + } \item{model.file}{file containing the model written in \pkg{OpenBUGS} code} \item{debug}{if \code{FALSE}, \pkg{OpenBUGS} is closed automatically, otherwise \pkg{OpenBUGS} remains open for further investigation. With This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Uwe L. <li...@st...> - 2011-03-08 17:58:52
|
On 08.03.2011 16:36, Chris Jackson wrote: > On 08/03/11 15:27, Uwe Ligges wrote: > >> Anyway, let me tackle the open issues on my list (that may have been >> resolved by others in the meantime anyway) and discuss with the rest of >> the CRAN crew how to handle the "binary" problem of BRugs (CRAN does not >> accept source packages that contain binaries and there should not be an >> exception just because I am listed as maintainer of this package). > > I've developed a version of BRugs which does not contain binaries. It > works smoothly with already-installed versions of OpenBUGS, on both > Windows and Linux, in the same way that rjags works with JAGS. These > will all be available from openbugs.info with the forthcoming release > of OpenBUGS (3.2.1). > > The source for this is currently on branches/linux in the sourceforge > repository. Great! I really have to work on it now and catch up with all the e-mail still assembled in my Inbox. Uwe > Chris |
From: Chris J. <chr...@mr...> - 2011-03-08 15:59:20
|
On 08/03/11 15:27, Uwe Ligges wrote: > Anyway, let me tackle the open issues on my list (that may have been > resolved by others in the meantime anyway) and discuss with the rest of > the CRAN crew how to handle the "binary" problem of BRugs (CRAN does not > accept source packages that contain binaries and there should not be an > exception just because I am listed as maintainer of this package). I've developed a version of BRugs which does not contain binaries. It works smoothly with already-installed versions of OpenBUGS, on both Windows and Linux, in the same way that rjags works with JAGS. These will all be available from openbugs.info with the forthcoming release of OpenBUGS (3.2.1). The source for this is currently on branches/linux in the sourceforge repository. Chris -- Christopher Jackson <chr...@mr...> Research Statistician, MRC Biostatistics Unit, Institute of Public Health, Robinson Way, Cambridge, UK, CB2 0SR. +44 (1223) 330381 |
From: Uwe L. <li...@st...> - 2011-03-08 15:27:32
|
On 08.03.2011 16:24, Rodney Sparapani wrote: > On 03/ 8/11 09:15 AM, Uwe Ligges wrote: >> CRAN extras is not a standard repository for Linux anyway (while it is >> for Windows). > Well, Windows and Mac OS X. But, not Linux; I guess Linux could be added > in the same spirit. I'm not advocating this approach, but it is possible. >> I am not entirely sure yet how we can solve it, since BRugs is still not >> a cross platform package but tied to very specific operating systems >> (some sorts of Linux + Windows, as far as I can see). >> >> Uwe > Well, I think it should be CRAN. For example, there are lots of > packages there that have special requirements beyond other R > packages. When you try to R CMD INSTALL them, you will get an > error message. But, it's harmless. BRugs is similar due to > it's requirement of openbugs.so It's not our fault that library > is not available on other OS's :o) > > And, actually, with the XBinary software you could create a > dynlib for Mac OS X, although, I haven't tried that. Similar > tricks may be available for x86/x64 UNIX in general. In any > case, if the BRugs package is on CRAN, then people will be > more motivated to try these tricks out. > Sure. Anyway, let me tackle the open issues on my list (that may have been resolved by others in the meantime anyway) and discuss with the rest of the CRAN crew how to handle the "binary" problem of BRugs (CRAN does not accept source packages that contain binaries and there should not be an exception just because I am listed as maintainer of this package). Uwe |
From: Rodney S. <rsp...@mc...> - 2011-03-08 15:24:32
|
On 03/ 8/11 09:15 AM, Uwe Ligges wrote: > CRAN extras is not a standard repository for Linux anyway (while it is > for Windows). Well, Windows and Mac OS X. But, not Linux; I guess Linux could be added in the same spirit. I'm not advocating this approach, but it is possible. > I am not entirely sure yet how we can solve it, since BRugs is still not > a cross platform package but tied to very specific operating systems > (some sorts of Linux + Windows, as far as I can see). > > Uwe Well, I think it should be CRAN. For example, there are lots of packages there that have special requirements beyond other R packages. When you try to R CMD INSTALL them, you will get an error message. But, it's harmless. BRugs is similar due to it's requirement of openbugs.so It's not our fault that library is not available on other OS's :o) And, actually, with the XBinary software you could create a dynlib for Mac OS X, although, I haven't tried that. Similar tricks may be available for x86/x64 UNIX in general. In any case, if the BRugs package is on CRAN, then people will be more motivated to try these tricks out. -- Rodney Sparapani Center for Patient Care and Outcomes Research Sr. Biostatistician http://www.mcw.edu/pcor 4 wheels good, 2 wheels better! Medical College of Wisconsin (MCW) WWLD?: What Would Lombardi Do? Milwaukee, WI, USA |
From: Uwe L. <li...@st...> - 2011-03-08 15:15:39
|
On 08.03.2011 16:13, Rodney Sparapani wrote: > On 03/ 8/11 02:59 AM, Uwe Ligges wrote: >> This is entirely my fault since I had negative amount of free timne to >> care about it during the last 6 months. It is very high on my priority >> list now and I finished the main teaching processes yesterday. So I may >> tackle it really soon (although I said that in the past and did not). >> >> >> Uwe > Hi Uwe: > > So, just to be clear. I'm not asking about timing per se, but > where will BRugs appear? On CRAN or CRAN extras? Hopefully, > CRAN because I don't think many people know about CRAN extras. CRAN extras is not a standard repository for Linux anyway (while it is for Windows). I am not entirely sure yet how we can solve it, since BRugs is still not a cross platform package but tied to very specific operating systems (some sorts of Linux + Windows, as far as I can see). Uwe |
From: Rodney S. <rsp...@mc...> - 2011-03-08 15:13:17
|
On 03/ 8/11 02:59 AM, Uwe Ligges wrote: > This is entirely my fault since I had negative amount of free timne to > care about it during the last 6 months. It is very high on my priority > list now and I finished the main teaching processes yesterday. So I may > tackle it really soon (although I said that in the past and did not). > > > Uwe Hi Uwe: So, just to be clear. I'm not asking about timing per se, but where will BRugs appear? On CRAN or CRAN extras? Hopefully, CRAN because I don't think many people know about CRAN extras. -- Rodney Sparapani Center for Patient Care and Outcomes Research Sr. Biostatistician http://www.mcw.edu/pcor 4 wheels good, 2 wheels better! Medical College of Wisconsin (MCW) WWLD?: What Would Lombardi Do? Milwaukee, WI, USA |
From: Uwe L. <li...@st...> - 2011-03-08 09:30:08
|
On 07.03.2011 22:24, Rodney Sparapani wrote: > > We recently switched to Linux. And, I was interested in running > BRugs. However, it does not exist on CRAN. I know that BRugs > for Windows is in CRAN extras, but BRugs for Linux is not. > This lead me to believe that BRugs for Linux does not exist. > However, that is mistaken since BRugs for Linux can be found > at > http://www.openbugs.info/w/UserContributedCode?action=AttachFile&do=get&target=BRugs_0.6-1.tar.gz > > So, my question is: why is BRugs for Linux not on CRAN? Others > may wrongly assume that it does not exist (as I did). > This is entirely my fault since I had negative amount of free timne to care about it during the last 6 months. It is very high on my priority list now and I finished the main teaching processes yesterday. So I may tackle it really soon (although I said that in the past and did not). Uwe |
From: Rodney S. <rsp...@mc...> - 2011-03-07 21:39:52
|
We recently switched to Linux. And, I was interested in running BRugs. However, it does not exist on CRAN. I know that BRugs for Windows is in CRAN extras, but BRugs for Linux is not. This lead me to believe that BRugs for Linux does not exist. However, that is mistaken since BRugs for Linux can be found at http://www.openbugs.info/w/UserContributedCode?action=AttachFile&do=get&target=BRugs_0.6-1.tar.gz So, my question is: why is BRugs for Linux not on CRAN? Others may wrongly assume that it does not exist (as I did). -- Rodney Sparapani Center for Patient Care and Outcomes Research Sr. Biostatistician http://www.mcw.edu/pcor 4 wheels good, 2 wheels better! Medical College of Wisconsin (MCW) WWLD?: What Would Lombardi Do? Milwaukee, WI, USA |
From: <chr...@us...> - 2011-03-07 15:09:21
|
Revision: 180 http://bugs-r.svn.sourceforge.net/bugs-r/?rev=180&view=rev Author: chris-jackson Date: 2011-03-07 15:09:12 +0000 (Mon, 07 Mar 2011) Log Message: ----------- Changes to allow BRugs to work seamlessly with an existing installation of OpenBUGS on Linux and Windows. Requires OpenBUGS 3.2.1 or later. Modified Paths: -------------- branches/linux/BRugs/.Rbuildignore branches/linux/BRugs/DESCRIPTION branches/linux/BRugs/NEWS branches/linux/BRugs/R/bugs.data.R branches/linux/BRugs/R/formatdata.R branches/linux/BRugs/R/internal.R branches/linux/BRugs/R/samples.density.R branches/linux/BRugs/R/unix/help.R branches/linux/BRugs/R/windows/help.R branches/linux/BRugs/R/zzz.R branches/linux/BRugs/man/BRugs.Rd branches/linux/BRugs/man/BRugsFit.Rd branches/linux/BRugs/man/bugs.data.Rd branches/linux/BRugs/src/BugsHelper.c branches/linux/BRugs/src/Makevars branches/linux/BRugs/tests/BRugs.R branches/linux/BRugs/tests/examples.R branches/linux/BRugs/tests/functions.R Added Paths: ----------- branches/linux/BRugs/Changelog branches/linux/BRugs/R/unix/internal.R branches/linux/BRugs/R/unix/zzz.R branches/linux/BRugs/R/unix/zzz.R.in branches/linux/BRugs/R/windows/internal.R branches/linux/BRugs/R/windows/zzz.R branches/linux/BRugs/configure branches/linux/BRugs/configure.ac branches/linux/BRugs/configure.win branches/linux/BRugs/src/Makefile.win branches/linux/BRugs/src/Makevars.in Removed Paths: ------------- branches/linux/BRugs/R/internal-linux.R branches/linux/BRugs/R/internal-win.R branches/linux/BRugs/inst/README-inst_OpenBUGS branches/linux/BRugs/src/Makevars.win Modified: branches/linux/BRugs/.Rbuildignore =================================================================== --- branches/linux/BRugs/.Rbuildignore 2010-11-13 17:31:25 UTC (rev 179) +++ branches/linux/BRugs/.Rbuildignore 2011-03-07 15:09:12 UTC (rev 180) @@ -1,2 +1,3 @@ -inst/README-inst_OpenBUGS exec/BugsHelper +exec +.+\.Rout Added: branches/linux/BRugs/Changelog =================================================================== --- branches/linux/BRugs/Changelog (rev 0) +++ branches/linux/BRugs/Changelog 2011-03-07 15:09:12 UTC (rev 180) @@ -0,0 +1 @@ +See "NEWS" Modified: branches/linux/BRugs/DESCRIPTION =================================================================== --- branches/linux/BRugs/DESCRIPTION 2010-11-13 17:31:25 UTC (rev 179) +++ branches/linux/BRugs/DESCRIPTION 2011-03-07 15:09:12 UTC (rev 180) @@ -1,11 +1,12 @@ Package: BRugs -Title: OpenBUGS and its R / S-PLUS interface BRugs -Version: 0.6-1 -Date: 2010-11-03 -Author: OpenBUGS was developed by Andrew Thomas, Dave Lunn, David Spiegelhalter and Nicky Best. R Code modified, extended and packaged for R by Uwe Ligges and Sibylle Sturtz. Some ideas taken from the R2WinBUGS package based on code by Andrew Gelman. With considerable contributions by Gregor Gorjanc. Linux port of BRugs and other developments by Chris Jackson. -Description: An R / S-PLUS package containing OpenBUGS and its R / S-PLUS interface BRugs. -Maintainer: Uwe Ligges <li...@st...> -Depends: R (>= 2.5.0), coda +Title: R interface to the OpenBUGS MCMC software +Version: 0.7 +Date: 2011-03-07 +Author: OpenBUGS was developed by Andrew Thomas, Dave Lunn, David Spiegelhalter and Nicky Best. R interface developed by Uwe Ligges, Sibylle Sturtz, Andrew Gelman, Gregor Gorjanc and Chris Jackson. Linux port and most recent developments by Chris Jackson. +Description: Fully-interactive R interface to the OpenBUGS software for Bayesian analysis using MCMC sampling +Maintainer: Chris Jackson <chr...@mr...> +Depends: R (>= 2.5.0), utils, coda +SystemRequirements: OpenBUGS (>= 3.2.1) Archs: i386 License: GPL-2 URL: http://www.openbugs.info/ Modified: branches/linux/BRugs/NEWS =================================================================== --- branches/linux/BRugs/NEWS 2010-11-13 17:31:25 UTC (rev 179) +++ branches/linux/BRugs/NEWS 2011-03-07 15:09:12 UTC (rev 180) @@ -1,3 +1,38 @@ +Version 0.7 +----------- + +BRugs now works with an existing installation of OpenBUGS (3.2.1 or +later) instead of being distributed with the OpenBUGS library. + +On Windows, the OpenBUGS location is determined by a registry key +which is installed by the OpenBUGS for Windows installation program. + +On Linux, the OpenBUGS shared library and documentation are assumed to +be installed together in a library directory. Using the new OpenBUGS +for Linux source package OpenBUGS-3.2.1.tar.gz or later, this library +directory is by default + +/usr/local/lib/OpenBUGS + +In most cases it should be detected automatically when installing, but +it can be changed by running, for instance + +R CMD INSTALL --configure-args='--with-openbugs=/usr/lib/OpenBUGS' + + + +Version 0.61 +------------ +Fix for crash in bugsData + + +Version 0.6 +----------- + +Forked from the version of BRugs (0.5.3) available on CRAN Extras. +This new version supports Linux for the first time, as detailed below. + + CHANGES MADE FOR LINUX PORT OF BRugs * A C program called BugsHelper is used to call the OpenBUGS shared Modified: branches/linux/BRugs/R/bugs.data.R =================================================================== --- branches/linux/BRugs/R/bugs.data.R 2010-11-13 17:31:25 UTC (rev 179) +++ branches/linux/BRugs/R/bugs.data.R 2011-03-07 15:09:12 UTC (rev 180) @@ -1,12 +1,14 @@ "bugsData" <- function(data, fileName = file.path(tempdir(), "data.txt"), format="E", digits = 5){ - if(is.numeric(unlist(data))) + if(is.list(data)) { + data <- lapply(data, function(x){x <- if(is.character(x)||is.factor(x)) match(x, unique(x)) else x}) if(is.R()) { write.datafile(lapply(data, formatC, digits = digits, format = format), fileName) } else { writeDatafileS4(data, towhere = "data.txt") } + } else { if(is.R()) { data.list <- lapply(as.list(data), get, pos = parent.frame(2)) Modified: branches/linux/BRugs/R/formatdata.R =================================================================== --- branches/linux/BRugs/R/formatdata.R 2010-11-13 17:31:25 UTC (rev 179) +++ branches/linux/BRugs/R/formatdata.R 2011-03-07 15:09:12 UTC (rev 180) @@ -6,7 +6,9 @@ datalist.string <- vector(n, mode = "list") datanames <- names(datalist) for (i in 1:n) { - datalist.string[[i]] <- + if (is.factor(datalist[[i]])) + datalist[[i]] <- as.integer(datalist[[i]]) + datalist.string[[i]] <- if (length(datalist[[i]]) == 1) paste(names(datalist)[i], "=", as.character(datalist[[i]]), sep = "") Deleted: branches/linux/BRugs/R/internal-linux.R =================================================================== --- branches/linux/BRugs/R/internal-linux.R 2010-11-13 17:31:25 UTC (rev 179) +++ branches/linux/BRugs/R/internal-linux.R 2011-03-07 15:09:12 UTC (rev 180) @@ -1,36 +0,0 @@ -dquote <- function(x){ - paste("\"", x, "\"", sep="") -} - -.OpenBUGS.Linux <- function(cmds, cmdtypes, args) -{ - ncmds <- length(cmds) - if (ncmds > 99999) stop("Maximum number of OpenBUGS API commands exceeded") - tempDir <- getOption("BRugsTmpdir") - ## Don't want internalize/externalize to overwrite the command - ## output buffer, so redirect its output to a separate trash can. - trashDir <- paste(tempDir, "_trash", sep="") - extFile <- getOption("BRugsExtFile") - pkgPath <- searchpaths()[search()=="package:BRugs"] - bugsPath <- paste(pkgPath, "/exec/BugsHelper", sep="") - shcmd <- paste(bugsPath, dquote(tempDir), dquote(trashDir), dquote(extFile)) - for (i in 1:ncmds) { - if (cmdtypes[i] %in% c("CharArray","RealArray")) - cat(args[[i]], file=paste(tempDir, "/input",i,".txt", sep="")) - cmdtype <- match(cmdtypes[i], .OpenBUGS.cmdtypes) - 1 - shcmd <- paste(shcmd, dquote(cmds[i]), cmdtype) - } - res <- system(shcmd) - handleRes(res) - out <- vector(ncmds, mode="list") - for (i in 1:ncmds) { - if (cmdtypes[i] %in% c("Integer","CharArray","RealArray")) - out[[i]] <- scan(paste(tempDir,"/output",i,".txt",sep=""), - switch(cmdtypes[i], - "Integer" = integer(), - "CharArray" = character(), - "RealArray" = double()), - quiet=TRUE) - } - out -} Deleted: branches/linux/BRugs/R/internal-win.R =================================================================== --- branches/linux/BRugs/R/internal-win.R 2010-11-13 17:31:25 UTC (rev 179) +++ branches/linux/BRugs/R/internal-win.R 2011-03-07 15:09:12 UTC (rev 180) @@ -1,33 +0,0 @@ -### Run a list of OpenBUGS API command strings - -.OpenBUGS.Windows <- function(cmds, cmdtypes, args) -{ - ncmds <- length(cmds) - out <- vector(ncmds, mode="list") - for (i in 1:ncmds) { - out[[i]] <- switch(cmdtypes[i], - "CmdInterpreter" = { - res <- .C("CmdInterpreter", cmds[i], nchar(cmds[i]), integer(1), PACKAGE = "BRugs") - handleRes(res[[3]]) - res - }, - "Integer" = { - values <- .C("Integer", cmds[i], nchar(cmds[i]), integer(1), integer(1), PACKAGE = "BRugs") - handleRes(values[[4]]) - as.integer(values[[3]]) - }, - "CharArray" = { - values <- .C("CharArray", cmds[i], nchar(cmds[i]), args[[i]], nchar(args[[i]]), integer(1), PACKAGE="BRugs") - handleRes(values[[5]]) - values[[3]] - }, - "RealArray" = { - values <- .C("RealArray", cmds[i], nchar(cmds[i]), args[[i]], length(args[[i]]), integer(1), PACKAGE="BRugs") - handleRes(values[[5]]) - values[[3]] - }) - - } - out -} - Modified: branches/linux/BRugs/R/internal.R =================================================================== --- branches/linux/BRugs/R/internal.R 2010-11-13 17:31:25 UTC (rev 179) +++ branches/linux/BRugs/R/internal.R 2011-03-07 15:09:12 UTC (rev 180) @@ -29,10 +29,7 @@ if (is.null(args)) args <- as.list(rep(NA, ncmds)) stopifnot(ncmds==length(cmdtypes)) stopifnot(ncmds==length(args)) - switch(Sys.info()["sysname"], - "Linux" = .OpenBUGS.Linux(cmds, cmdtypes, args), - "Windows" = .OpenBUGS.Windows(cmds, cmdtypes, args), - stop("Only Linux and Windows are supported")) + .OpenBUGS.platform(cmds, cmdtypes, args) } handleRes <- function(res) Modified: branches/linux/BRugs/R/samples.density.R =================================================================== --- branches/linux/BRugs/R/samples.density.R 2010-11-13 17:31:25 UTC (rev 179) +++ branches/linux/BRugs/R/samples.density.R 2011-03-07 15:09:12 UTC (rev 180) @@ -31,10 +31,12 @@ thin <- max(c(thin, 1)) samplesSetThin(thin) mons <- samplesMonitors(node) - if (is.R()) - par(mfrow = mfrow, ask = ask, ann = ann) - else - par(mfrow = mfrow, ask = ask) + if (plot) { + if (is.R()) + par(mfrow = mfrow, ask = ask, ann = ann) + else + par(mfrow = mfrow, ask = ask) + } result <- sapply(mons, plotDensity, plot=plot, ...) if (!is.R()) invisible() Modified: branches/linux/BRugs/R/unix/help.R =================================================================== --- branches/linux/BRugs/R/unix/help.R 2010-11-13 17:31:25 UTC (rev 179) +++ branches/linux/BRugs/R/unix/help.R 2011-03-07 15:09:12 UTC (rev 180) @@ -24,6 +24,6 @@ "switch to its window."), exdent = 4)) writeLines("Otherwise, be patient ...") - browseURL(system.file("OpenBUGS", "Manuals", "Contents.html", package="BRugs")) + browseURL(paste(options()$OpenBUGS, "doc", "Manuals", "Contents.html", sep="/")) invisible("") } Added: branches/linux/BRugs/R/unix/internal.R =================================================================== --- branches/linux/BRugs/R/unix/internal.R (rev 0) +++ branches/linux/BRugs/R/unix/internal.R 2011-03-07 15:09:12 UTC (rev 180) @@ -0,0 +1,36 @@ +dquote <- function(x){ + paste("\"", x, "\"", sep="") +} + +.OpenBUGS.platform <- function(cmds, cmdtypes, args) +{ + ncmds <- length(cmds) + if (ncmds > 99999) stop("Maximum number of OpenBUGS API commands exceeded") + tempDir <- getOption("BRugsTmpdir") + ## Don't want internalize/externalize to overwrite the command + ## output buffer, so redirect its output to a separate trash can. + trashDir <- paste(tempDir, "_trash", sep="") + extFile <- getOption("BRugsExtFile") + pkgPath <- searchpaths()[search()=="package:BRugs"] + bugsPath <- paste(pkgPath, "/exec/BugsHelper", sep="") + shcmd <- paste(bugsPath, dquote(tempDir), dquote(trashDir), dquote(extFile)) + for (i in 1:ncmds) { + if (cmdtypes[i] %in% c("CharArray","RealArray")) + cat(args[[i]], file=paste(tempDir, "/input",i,".txt", sep="")) + cmdtype <- match(cmdtypes[i], .OpenBUGS.cmdtypes) - 1 + shcmd <- paste(shcmd, dquote(cmds[i]), cmdtype) + } + res <- system(shcmd) + handleRes(res) + out <- vector(ncmds, mode="list") + for (i in 1:ncmds) { + if (cmdtypes[i] %in% c("Integer","CharArray","RealArray")) + out[[i]] <- scan(paste(tempDir,"/output",i,".txt",sep=""), + switch(cmdtypes[i], + "Integer" = integer(), + "CharArray" = character(), + "RealArray" = double()), + quiet=TRUE) + } + out +} Added: branches/linux/BRugs/R/unix/zzz.R =================================================================== --- branches/linux/BRugs/R/unix/zzz.R (rev 0) +++ branches/linux/BRugs/R/unix/zzz.R 2011-03-07 15:09:12 UTC (rev 180) @@ -0,0 +1,18 @@ +if (is.R()){ + + ".onLoad" <- function(lib, pkg){ + ## TODO any need for these to be user specifiable? + options("BRugsTmpdir" = gsub("\\\\", "/", tempdir())) + options("BRugsExtFile" = paste(basename(tempfile()), ".bug", sep="")) + options(OpenBUGS = "/home/chris/usr/lib/OpenBUGS") + + if(is.null(getOption("BRugsVerbose"))) + options("BRugsVerbose" = TRUE) + .initGlobals() + options(OpenBUGSExamples = paste(options()$OpenBUGS, "doc", "Examples", sep="/")) + } + + ".onUnload" <- function(libpath){ + } + +} Added: branches/linux/BRugs/R/unix/zzz.R.in =================================================================== --- branches/linux/BRugs/R/unix/zzz.R.in (rev 0) +++ branches/linux/BRugs/R/unix/zzz.R.in 2011-03-07 15:09:12 UTC (rev 180) @@ -0,0 +1,18 @@ +if (is.R()){ + + ".onLoad" <- function(lib, pkg){ + ## TODO any need for these to be user specifiable? + options("BRugsTmpdir" = gsub("\\\\", "/", tempdir())) + options("BRugsExtFile" = paste(basename(tempfile()), ".bug", sep="")) + options(OpenBUGS = "@OPENBUGS@") + + if(is.null(getOption("BRugsVerbose"))) + options("BRugsVerbose" = TRUE) + .initGlobals() + options(OpenBUGSExamples = paste(options()$OpenBUGS, "doc", "Examples", sep="/")) + } + + ".onUnload" <- function(libpath){ + } + +} Modified: branches/linux/BRugs/R/windows/help.R =================================================================== --- branches/linux/BRugs/R/windows/help.R 2010-11-13 17:31:25 UTC (rev 179) +++ branches/linux/BRugs/R/windows/help.R 2011-03-07 15:09:12 UTC (rev 180) @@ -2,7 +2,7 @@ { ## stolen from help.start() # a <- system.file("OpenBUGS", "Manuals", "WinBUGS Manual.html", package="BRugs") - # if (!file.exists(a)) + # if (!file.exists(a)) # stop("I can't find the html help") # a <- chartr("/", "\\", a) # message("If nothing happens, you should open `", a, "' yourself") @@ -15,9 +15,9 @@ help.WinBUGS <- function(browser = getOption("browser")) { # stolen from help.start() - a <- system.file("OpenBUGS", "Manuals", "Contents.html", package="BRugs") - if (!file.exists(a)) - stop("I can't find the html help") + a <- paste(options()$OpenBUGS, "Manuals", "Contents.html", sep="\\") + if (!file.exists(a)) + stop("HTML help not found in file ", a) if (is.R()) a <- chartr("/", "\\", a) else Added: branches/linux/BRugs/R/windows/internal.R =================================================================== --- branches/linux/BRugs/R/windows/internal.R (rev 0) +++ branches/linux/BRugs/R/windows/internal.R 2011-03-07 15:09:12 UTC (rev 180) @@ -0,0 +1,32 @@ +### Run a list of OpenBUGS API command strings + +.OpenBUGS.platform <- function(cmds, cmdtypes, args) +{ + ncmds <- length(cmds) + out <- vector(ncmds, mode="list") + for (i in 1:ncmds) { + out[[i]] <- switch(cmdtypes[i], + "CmdInterpreter" = { + res <- .C("CmdInterpreter", cmds[i], nchar(cmds[i]), integer(1), PACKAGE="libOpenBUGS") + handleRes(res[[3]]) + res + }, + "Integer" = { + values <- .C("Integer", cmds[i], nchar(cmds[i]), integer(1), integer(1), PACKAGE="libOpenBUGS") + handleRes(values[[4]]) + as.integer(values[[3]]) + }, + "CharArray" = { + values <- .C("CharArray", cmds[i], nchar(cmds[i]), args[[i]], nchar(args[[i]]), integer(1), PACKAGE="libOpenBUGS") + handleRes(values[[5]]) + values[[3]] + }, + "RealArray" = { + values <- .C("RealArray", cmds[i], nchar(cmds[i]), args[[i]], length(args[[i]]), integer(1), PACKAGE="libOpenBUGS") + handleRes(values[[5]]) + values[[3]] + }) + + } + out +} Added: branches/linux/BRugs/R/windows/zzz.R =================================================================== --- branches/linux/BRugs/R/windows/zzz.R (rev 0) +++ branches/linux/BRugs/R/windows/zzz.R 2011-03-07 15:09:12 UTC (rev 180) @@ -0,0 +1,44 @@ +if (is.R()){ + + ".onLoad" <- function(lib, pkg){ + ob.reg <- try(utils:::readRegistry("Software\\OpenBUGS","HLM")) + if (inherits(ob.reg, "try-error")) stop("OpenBUGS 3.2.1 or greater must be installed") + rnames <- names(ob.reg) + ver <- gsub("OpenBUGS ", "", rnames) + ver <- gsub("(.+)e$","\\1", ver) + version.inst <- as.numeric(paste(substr(ver, 1, 2), gsub("\\.","",substr(ver, 3, nchar(ver))), sep="")) + deps <- utils:::packageDescription("BRugs", fields="SystemRequirements") + ver <- gsub(".*OpenBUGS ?\\(>= ?(.+)\\).*", "\\1", deps) + version.req <- as.numeric(paste(substr(ver, 1, 2), gsub("\\.","",substr(ver, 3, nchar(ver))), sep="")) + if (max(version.inst) < version.req) + stop("Found OpenBUGS version ", version.inst, ". Requires ", version.req, " or greater") + ## OpenBUGS installation location + options(OpenBUGS = utils:::readRegistry(paste("Software","OpenBUGS",rnames[which.max(version.inst)],sep="\\"),"HLM")$InstallPath) + libname <- paste(options()$OpenBUGS, "libOpenBUGS.dll", sep="/") + if (!file.exists(libname)) { + stop("Shared library \"libOpenBUGS.dll\" not found in ", options()$OpenBUGS) + } + ## All checks passed - load the DLL + dyn.load(libname) + len <- nchar(options()$OpenBUGS) + .C("SetWorkingDir", as.character(options()$OpenBUGS), len, PACKAGE="libOpenBUGS") + ## Set temporary dir for "buffer.txt" output + tempDir <- gsub("\\\\", "/", tempdir()) + .C("SetTempDir", as.character(tempDir), nchar(tempDir), PACKAGE="libOpenBUGS") + command <- "BugsMappers.SetDest(2)" + .CmdInterpreter(command) + + if(is.null(getOption("BRugsVerbose"))) + options("BRugsVerbose" = TRUE) + .initGlobals() + options(OpenBUGSExamples = paste(options()$OpenBUGS, "Examples", sep="/")) + } + + ".onUnload" <- function(libpath){ + if(is.loaded("CmdInterpreter")) { + libname <- paste(options()$OpenBUGS, "libOpenBUGS.dll", sep="/") + dyn.unload(libname) + } + } + +} Modified: branches/linux/BRugs/R/zzz.R =================================================================== --- branches/linux/BRugs/R/zzz.R 2010-11-13 17:31:25 UTC (rev 179) +++ branches/linux/BRugs/R/zzz.R 2011-03-07 15:09:12 UTC (rev 180) @@ -1,3 +1,5 @@ +## See unix/zzz.R, windows/zzz.R for platform specific .onLoad functions + if (is.R()){ .initGlobals <- function(){ @@ -7,61 +9,19 @@ options("BRugsSamplesLastChain" = 1) options("BRugsSamplesThin" = 1) options("BRugsSamplesVariable" = "*") - options("BRugsNextChain" = 1) # index of chain which needs to be initialized next + options("BRugsNextChain" = 1) # index of chain which needs to be initialized next options("BRugsPrec" = 4) } - - .onLoad <- function(...) { - switch(Sys.info()["sysname"], - "Linux" = .onLoad.Linux(...), - "Windows" = .onLoad.Windows(...), - stop("Only Linux and Windows are supported")) - if(is.null(getOption("BRugsVerbose"))) - options("BRugsVerbose" = TRUE) - .initGlobals() - } - - ".onLoad.Windows" <- function(lib, pkg){ - ## sets path / file variables and initializes subsystems - root <- file.path(system.file("OpenBUGS", package=pkg)) - library.dynam("BRugs", pkg, lib) - len <- nchar(root) - tempDir <- gsub("\\\\", "/", tempdir()) - .C("SetWorkingDir", as.character(root), len, PACKAGE="BRugs") - .C("SetTempDir", as.character(tempDir), nchar(tempDir), PACKAGE="BRugs") - command <- "BugsMappers.SetDest(2)" - .CmdInterpreter(command) - } - ".onLoad.Linux" <- function(lib, pkg){ - ## TODO any need for these to be user specifiable? - options("BRugsTmpdir" = gsub("\\\\", "/", tempdir())) - options("BRugsExtFile" = paste(basename(tempfile()), ".bug", sep="")) - } - ".onAttach" <- function(lib, pkg){ message("Welcome to BRugs running on OpenBUGS version 3.1.2") } - .onUnload <- function(...) { - switch(Sys.info()["sysname"], - "Linux" = .onUnload.Linux(...), - "Windows" = .onUnload.Windows(...), - stop("Only Linux and Windows are supported")) - } - - ".onUnload.Windows" <- function(libpath){ - library.dynam.unload("BRugs", libpath) - } - - ".onUnload.Linux" <- function(libpath){ - } - ## Overwriting new (from R-2.6.0) sQuote (for typing human readable text) in R within the BRugs Namespace! ## we cannot use sQuote that uses fancy quotes! sQuote <- function(x) paste("'", x, "'", sep="") - + } else { # ends if (is.R()) ".First.lib" <- function(lib.loc, section) @@ -76,12 +36,12 @@ command <- "BugsMappers.SetDest(2)" .C("CmdInterpreter", as.character(command), nchar(command), integer(1)) if(is.null(getOption("BRugsVerbose"))) - options("BRugsVerbose" = TRUE) + options("BRugsVerbose" = TRUE) invisible() } - + .tempDir <- getwd() - + tempdir <- function(){ .tempDir } } # ends else Added: branches/linux/BRugs/configure =================================================================== --- branches/linux/BRugs/configure (rev 0) +++ branches/linux/BRugs/configure 2011-03-07 15:09:12 UTC (rev 180) @@ -0,0 +1,5000 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.65 for BRugs 0.7. +# +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug...@gn... about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with status $?, using 1 if that was 0. +as_fn_error () +{ + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + fi + $as_echo "$as_me: error: $1" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +test -n "$DJDIR" || exec 7<&0 </dev/null +exec 6>&1 + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='BRugs' +PACKAGE_TARNAME='brugs' +PACKAGE_VERSION='0.7' +PACKAGE_STRING='BRugs 0.7' +PACKAGE_BUGREPORT='' +PACKAGE_URL='' + +ac_default_prefix=/usr/local +ac_subst_vars='LTLIBOBJS +LIBOBJS +OPENBUGS +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +ac_prefix_program +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +with_openbugs +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) as_fn_error "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information." + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error "pwd does not report name of working directory" + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures BRugs 0.7 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix ... [truncated message content] |
From: <li...@us...> - 2010-11-13 17:31:31
|
Revision: 179 http://bugs-r.svn.sourceforge.net/bugs-r/?rev=179&view=rev Author: ligges Date: 2010-11-13 17:31:25 +0000 (Sat, 13 Nov 2010) Log Message: ----------- add documentation and changed example that passing names rather than objects to the "data" argument of bugsData and similar functions is unsafe and not recommended Modified Paths: -------------- trunk/BRugs/man/BRugsFit.Rd trunk/BRugs/man/bugs.data.Rd trunk/R2WinBUGS/man/bugs.Rd trunk/R2WinBUGS/man/bugs.data.Rd Modified: trunk/BRugs/man/BRugsFit.Rd =================================================================== --- trunk/BRugs/man/BRugsFit.Rd 2010-11-05 08:48:04 UTC (rev 178) +++ trunk/BRugs/man/BRugsFit.Rd 2010-11-13 17:31:25 UTC (rev 179) @@ -12,7 +12,7 @@ \item{modelFile}{File containing the model written in OpenBUGS code, an R function that contains a BUGS model that is written to a temporary model file (see \code{\link{tempfile}}) using \code{\link{writeModel}}.} \item{data}{Either a named list (names corresponding to variable names in the \code{modelFile}) - of the data for the OpenBUGS model, \emph{or} + of the data for the OpenBUGS model, \emph{or} (which is not recommended and unsafe) a vector or list of the names of the data objects used by the model. In these cases data are written into a file \file{data.txt} into the temporary directory of the current R session. Modified: trunk/BRugs/man/bugs.data.Rd =================================================================== --- trunk/BRugs/man/bugs.data.Rd 2010-11-05 08:48:04 UTC (rev 178) +++ trunk/BRugs/man/bugs.data.Rd 2010-11-13 17:31:25 UTC (rev 179) @@ -7,7 +7,7 @@ } \arguments{ \item{data}{either a named list (names corresponding to variable names in the model file) - of the data for the OpenBUGS model, \emph{or} + of the data for the OpenBUGS model, \emph{or} (which is not recommended and unsafe) a vector or list of the names of the data objects used by the model} \item{fileName}{the filename, defaults to \file{data.txt} in the temporary directory of the current R session} \item{digits}{number of significant digits used for OpenBUGS input, see \code{\link{formatC}}} Modified: trunk/R2WinBUGS/man/bugs.Rd =================================================================== --- trunk/R2WinBUGS/man/bugs.Rd 2010-11-05 08:48:04 UTC (rev 178) +++ trunk/R2WinBUGS/man/bugs.Rd 2010-11-13 17:31:25 UTC (rev 179) @@ -23,7 +23,7 @@ \arguments{ \item{data}{either a named list (names corresponding to variable names in the \code{model.file}) of the data for the \pkg{WinBUGS} model, - \emph{or} a vector or list of the names of the data objects used by + \emph{or} (which is not recommended and unsafe) a vector or list of the names of the data objects used by the model. If \code{data} is a one element character vector (such as \code{"data.txt"}), it is assumed that data have already been written to the working directory into that file, e.g. by the function \code{\link{bugs.data}}.} @@ -229,7 +229,7 @@ J <- nrow(schools) y <- schools$estimate sigma.y <- schools$sd -data <- list ("J", "y", "sigma.y") +data <- list(J=J, y=y, sigma.y=sigma.y) inits <- function(){ list(theta=rnorm(J, 0, 100), mu.theta=rnorm(1, 0, 100), sigma.theta=runif(1, 0, 100)) Modified: trunk/R2WinBUGS/man/bugs.data.Rd =================================================================== --- trunk/R2WinBUGS/man/bugs.data.Rd 2010-11-05 08:48:04 UTC (rev 178) +++ trunk/R2WinBUGS/man/bugs.data.Rd 2010-11-13 17:31:25 UTC (rev 179) @@ -11,7 +11,7 @@ \arguments{ \item{data}{either a named list (names corresponding to variable names in the \code{model.file}) of the data for the \pkg{WinBUGS} model, - \emph{or} a vector or list of the names of the data objects used by + \emph{or} (which is not recommended and unsafe) a vector or list of the names of the data objects used by the model} \item{dir}{the directory to write the file \file{data.txt} to} \item{digits}{number of significant digits used for \pkg{WinBUGS} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2010-11-05 08:48:10
|
Revision: 178 http://bugs-r.svn.sourceforge.net/bugs-r/?rev=178&view=rev Author: chris-jackson Date: 2010-11-05 08:48:04 +0000 (Fri, 05 Nov 2010) Log Message: ----------- Add format option Modified Paths: -------------- branches/linux/BRugs/R/bugs.inits.R Modified: branches/linux/BRugs/R/bugs.inits.R =================================================================== --- branches/linux/BRugs/R/bugs.inits.R 2010-11-05 08:42:23 UTC (rev 177) +++ branches/linux/BRugs/R/bugs.inits.R 2010-11-05 08:48:04 UTC (rev 178) @@ -1,5 +1,5 @@ "bugsInits" <- -function (inits, numChains = 1, fileName, digits = 5){ +function (inits, numChains = 1, fileName, format="E", digits = 5){ if(missing(fileName)) fileName <- file.path(tempdir(), paste("inits", 1:numChains, ".txt", sep = "")) if(length(fileName) != numChains) @@ -8,12 +8,12 @@ for (i in 1:numChains){ if (is.function(inits)) if (is.R()) - write.datafile(lapply(inits(), formatC, digits = digits, format = "E"), fileName[i]) + write.datafile(lapply(inits(), formatC, digits = digits, format = format), fileName[i]) else writeDatafileS4(inits(), towhere = fileName[i]) else if (is.R()) - write.datafile(lapply(inits[[i]], formatC, digits = digits, format = "E"), fileName[i]) + write.datafile(lapply(inits[[i]], formatC, digits = digits, format = format), fileName[i]) else writeDatafileS4(inits[[i]], towhere = fileName[i]) } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2010-11-05 08:42:29
|
Revision: 177 http://bugs-r.svn.sourceforge.net/bugs-r/?rev=177&view=rev Author: chris-jackson Date: 2010-11-05 08:42:23 +0000 (Fri, 05 Nov 2010) Log Message: ----------- Update doc with new "format" argument Modified Paths: -------------- branches/linux/BRugs/man/bugs.data.Rd branches/linux/BRugs/man/bugs.inits.Rd Modified: branches/linux/BRugs/man/bugs.data.Rd =================================================================== --- branches/linux/BRugs/man/bugs.data.Rd 2010-11-04 21:47:27 UTC (rev 176) +++ branches/linux/BRugs/man/bugs.data.Rd 2010-11-05 08:42:23 UTC (rev 177) @@ -3,7 +3,8 @@ \title{Writing input for OpenBUGS} \description{Write data file for OpenBUGS.} \usage{ -bugsData(data, fileName = file.path(tempdir(), "data.txt"), digits = 5) +bugsData(data, fileName = file.path(tempdir(), "data.txt"), + format="E", digits = 5) } \arguments{ \item{data}{Either a named list (names corresponding to variable names in the model file) Modified: branches/linux/BRugs/man/bugs.inits.Rd =================================================================== --- branches/linux/BRugs/man/bugs.inits.Rd 2010-11-04 21:47:27 UTC (rev 176) +++ branches/linux/BRugs/man/bugs.inits.Rd 2010-11-05 08:42:23 UTC (rev 177) @@ -3,7 +3,7 @@ \title{Writing input for OpenBUGS} \description{Write files containing initial values.} \usage{ -bugsInits(inits, numChains = 1, fileName, digits = 5) +bugsInits(inits, numChains = 1, fileName, format="E", digits = 5) } \arguments{ \item{inits}{a list with \code{n.chains} elements; each element of the list is @@ -12,6 +12,9 @@ \item{numChains}{number of Markov chains} \item{fileName}{the filename(s), one for each chain. Defaults to \file{inits1.txt}, ..., \file{initsN.txt} in the temporary directory of the current R session.} + \item{format}{String to pass to + \code{\link{formatC}} which controls formatting of numbers. The default \code{"E"} formats all numbers in + scientific notation. The alternative "fg" uses a standard format. } \item{digits}{number of significant digits used for OpenBUGS input, see \code{\link{formatC}}} } \value{ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2010-11-04 21:47:34
|
Revision: 176 http://bugs-r.svn.sourceforge.net/bugs-r/?rev=176&view=rev Author: chris-jackson Date: 2010-11-04 21:47:27 +0000 (Thu, 04 Nov 2010) Log Message: ----------- Fix bugsData to not require a loaded model (forthcoming OpenBUGS will accept data variables which don't appear in the model). In bugsData, pass "format" to formatC as well as "digits" BugsHelper.c compiles cleanly with -Wall Correct date in DESCRIPTION Modified Paths: -------------- branches/linux/BRugs/DESCRIPTION branches/linux/BRugs/R/bugs.data.R branches/linux/BRugs/R/formatdata.R branches/linux/BRugs/inst/README-inst_OpenBUGS branches/linux/BRugs/man/bugs.data.Rd branches/linux/BRugs/src/BugsHelper.c Modified: branches/linux/BRugs/DESCRIPTION =================================================================== --- branches/linux/BRugs/DESCRIPTION 2010-10-02 13:00:50 UTC (rev 175) +++ branches/linux/BRugs/DESCRIPTION 2010-11-04 21:47:27 UTC (rev 176) @@ -1,7 +1,7 @@ Package: BRugs Title: OpenBUGS and its R / S-PLUS interface BRugs -Version: 0.6-0 -Date: 2010-04-30 +Version: 0.6-1 +Date: 2010-11-03 Author: OpenBUGS was developed by Andrew Thomas, Dave Lunn, David Spiegelhalter and Nicky Best. R Code modified, extended and packaged for R by Uwe Ligges and Sibylle Sturtz. Some ideas taken from the R2WinBUGS package based on code by Andrew Gelman. With considerable contributions by Gregor Gorjanc. Linux port of BRugs and other developments by Chris Jackson. Description: An R / S-PLUS package containing OpenBUGS and its R / S-PLUS interface BRugs. Maintainer: Uwe Ligges <li...@st...> Modified: branches/linux/BRugs/R/bugs.data.R =================================================================== --- branches/linux/BRugs/R/bugs.data.R 2010-10-02 13:00:50 UTC (rev 175) +++ branches/linux/BRugs/R/bugs.data.R 2010-11-04 21:47:27 UTC (rev 176) @@ -1,8 +1,8 @@ "bugsData" <- -function(data, fileName = file.path(tempdir(), "data.txt"), digits = 5){ +function(data, fileName = file.path(tempdir(), "data.txt"), format="E", digits = 5){ if(is.numeric(unlist(data))) if(is.R()) { - write.datafile(lapply(data, formatC, digits = digits, format = "E"), fileName) + write.datafile(lapply(data, formatC, digits = digits, format = format), fileName) } else { writeDatafileS4(data, towhere = "data.txt") @@ -11,7 +11,7 @@ if(is.R()) { data.list <- lapply(as.list(data), get, pos = parent.frame(2)) names(data.list) <- as.list(data) - write.datafile(lapply(data.list, formatC, digits = digits, format = "E"), fileName) + write.datafile(lapply(data.list, formatC, digits = digits, format = format), fileName) } else { data.list <- lapply(as.list(data), get, where = parent.frame(2)) Modified: branches/linux/BRugs/R/formatdata.R =================================================================== --- branches/linux/BRugs/R/formatdata.R 2010-10-02 13:00:50 UTC (rev 175) +++ branches/linux/BRugs/R/formatdata.R 2010-11-04 21:47:27 UTC (rev 176) @@ -1,28 +1,29 @@ "formatdata" <- function (datalist){ - if (!is.list(datalist) || is.data.frame(datalist)) + if (!is.list(datalist) || is.data.frame(datalist)) stop("argument to formatdata() ", "must be a list") n <- length(datalist) datalist.string <- vector(n, mode = "list") datanames <- names(datalist) for (i in 1:n) { - datalist.string[[i]] <- - switch(as.character(dimensions(datanames[i])), - "0" = paste(names(datalist)[i], - "=", as.character(datalist[[i]]), sep = ""), - "1" = paste(names(datalist)[i], - "=c(", paste(as.character(datalist[[i]]), collapse = ", "), - ")", sep = ""), - paste(names(datalist)[i], - "= structure(.Data= c(", - paste(as.character(as.vector(aperm(datalist[[i]]))), collapse = ", "), - "), .Dim=c(", - paste(as.character(dim(datalist[[i]])), collapse = ", "), - "))", sep = "") - ) + datalist.string[[i]] <- + if (length(datalist[[i]]) == 1) + paste(names(datalist)[i], + "=", as.character(datalist[[i]]), sep = "") + else if (is.vector(datalist[[i]]) && length(datalist[[i]]) > 1) + paste(names(datalist)[i], + "=c(", paste(as.character(datalist[[i]]), collapse = ", "), + ")", sep = "") + else + paste(names(datalist)[i], + "= structure(.Data= c(", + paste(as.character(as.vector(aperm(datalist[[i]]))), collapse = ", "), + "), .Dim=c(", + paste(as.character(dim(datalist[[i]])), collapse = ", "), + "))", sep = "") } - datalist.tofile <- paste("list(", - paste(unlist(datalist.string), collapse = ", "), + datalist.tofile <- paste("list(", + paste(unlist(datalist.string), collapse = ", "), ")", sep = "") return(datalist.tofile) } Modified: branches/linux/BRugs/inst/README-inst_OpenBUGS =================================================================== --- branches/linux/BRugs/inst/README-inst_OpenBUGS 2010-10-02 13:00:50 UTC (rev 175) +++ branches/linux/BRugs/inst/README-inst_OpenBUGS 2010-11-04 21:47:27 UTC (rev 176) @@ -13,8 +13,13 @@ REM OpenBUGS/Manuals/*.bmp REM OpenBUGS/Manuals/*.html +REM Run this script from Windows command prompt from within this directory as follows: +REM +REM cmd < README-inst_OpenBUGS +REM + REM Set the directory path of latest OpenBUGS distribution -set OpenBUGS=C:/Programs/BUGS/OpenBUGS_latest +set OpenBUGS="C:/Program Files/OpenBUGS/OpenBUGS312" REM Cleanup previous files and create the directory structure rm -Rf OpenBUGS @@ -25,7 +30,7 @@ REM Copy the files cp -f %OpenBUGS%/libOpenBUGS.dll . cp -f %OpenBUGS%/libOpenBUGS.so . -cp -f %OpenBUGS%/libtaucs.dll . +REM cp -f %OpenBUGS%/libtaucs.dll . cp -f %OpenBUGS%/Examples/{*.bmp,*.html,*.txt} Examples/. cp -f %OpenBUGS%/Developer/{*.bmp,*.html} Developer/. -cp -f %OpenBUGS%/Manuals/{*.bmp,*.html} Manuals/. \ No newline at end of file +cp -f %OpenBUGS%/Manuals/{*.bmp,*.html} Manuals/. Modified: branches/linux/BRugs/man/bugs.data.Rd =================================================================== --- branches/linux/BRugs/man/bugs.data.Rd 2010-10-02 13:00:50 UTC (rev 175) +++ branches/linux/BRugs/man/bugs.data.Rd 2010-11-04 21:47:27 UTC (rev 176) @@ -6,17 +6,20 @@ bugsData(data, fileName = file.path(tempdir(), "data.txt"), digits = 5) } \arguments{ - \item{data}{either a named list (names corresponding to variable names in the model file) + \item{data}{Either a named list (names corresponding to variable names in the model file) of the data for the OpenBUGS model, \emph{or} a vector or list of the names of the data objects used by the model} - \item{fileName}{the filename, defaults to \file{data.txt} in the temporary directory of the current R session} - \item{digits}{number of significant digits used for OpenBUGS input, see \code{\link{formatC}}} + \item{fileName}{The filename, defaults to \file{data.txt} in the temporary directory of the current R session} + \item{format}{String to pass to + \code{\link{formatC}} which controls formatting of numbers. The default \code{"E"} formats all numbers in + scientific notation. The alternative "fg" uses a standard format. } + \item{digits}{Number of significant digits used for OpenBUGS input, + see \code{\link{formatC}}. This may need to be adjusted from the + default of 5, for example when writing large integers.} } \value{ Invisibly returns the \code{fileName}. } -\note{\code{bugsData} uses \code{format="E"} internally, i.e. you need to - pay attention when writing integers containg many significant digits to the data file.} \seealso{\code{\link{BRugs}}} \keyword{file} \concept{data} Modified: branches/linux/BRugs/src/BugsHelper.c =================================================================== --- branches/linux/BRugs/src/BugsHelper.c 2010-10-02 13:00:50 UTC (rev 175) +++ branches/linux/BRugs/src/BugsHelper.c 2010-11-04 21:47:27 UTC (rev 176) @@ -104,9 +104,6 @@ free(fname); } -int file_size() { -} - void read_input_char(char *tmpdir, char **out, int *len, int cmdno) { char *fname; struct stat buf; @@ -174,7 +171,7 @@ free(fname); } -int do_TempDir(char *dir) { +void do_TempDir(char *dir) { int length; length = strlen(dir); SetTempDir(&dir, &length); @@ -205,7 +202,6 @@ int do_CharArray(char *cmd, char *tmpdir, int cmdno) { int length, outlength, res; char *out; - int i; length = strlen(cmd); read_input_char(tmpdir, &out, &outlength, cmdno); #ifdef DEBUG @@ -218,7 +214,7 @@ } int do_RealArray(char *cmd, char *tmpdir, int cmdno) { - int length, outlength, res, i; + int length, outlength, res; double *out; read_input_real(tmpdir, &out, &outlength, cmdno); length = strlen(cmd); @@ -234,7 +230,7 @@ } int do_Internalize(char *tmpdir, char *extfile){ - char *extpath, *extpath_base, *int_cmd; + char *extpath, *int_cmd; struct stat buf; int res; extpath = (char *) malloc(strlen(tmpdir) + 2 + strlen(extfile)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <snt...@us...> - 2010-10-02 13:00:56
|
Revision: 175 http://bugs-r.svn.sourceforge.net/bugs-r/?rev=175&view=rev Author: snthomas99 Date: 2010-10-02 13:00:50 +0000 (Sat, 02 Oct 2010) Log Message: ----------- trying validation code commit again Added Paths: ----------- trunk/R2OpenBUGS/inst/validateInstallOpenBUGS/ trunk/R2OpenBUGS/inst/validateInstallOpenBUGS/validOpenBUGSResults.R Added: trunk/R2OpenBUGS/inst/validateInstallOpenBUGS/validOpenBUGSResults.R =================================================================== --- trunk/R2OpenBUGS/inst/validateInstallOpenBUGS/validOpenBUGSResults.R (rev 0) +++ trunk/R2OpenBUGS/inst/validateInstallOpenBUGS/validOpenBUGSResults.R 2010-10-02 13:00:50 UTC (rev 175) @@ -0,0 +1,135 @@ +list(structure(c(13.475, 27.37549, 40.81623, -0.84648, 0.0435, +8.69959, 7.45923, 8.83783, 3.01268, 0.11018, -3.781, 12.88, 23.37975, +-4.50322, -0.0263, 7.569, 22.42, 34.89, -1.27, 0.02274, 13.51, +27.27, 40.84, -0.6692, 0.03729, 19.4, 32.22, 46.75, -0.281, 0.05947, +30.5305, 42.32, 58.19, 0.86515, 0.1835), .Dim = c(5L, 7L), .Dimnames = list( + c("X[1]", "X[2]", "X[3]", "theta[1]", "theta[2]"), c("mean", + "sd", "2.5%", "25%", "50%", "75%", "97.5%"))), structure(c(1.80567, +1.1796, 1.09627, 0.3957, 0.38387, 0.29497, 1, 1, 1, 2, 1, 1, +2, 1, 1, 2, 1, 1, 2, 2, 2), .Dim = c(3L, 7L), .Dimnames = list( + c("bronchitis", "either", "lung.cancer"), c("mean", "sd", + "2.5%", "25%", "50%", "75%", "97.5%"))), structure(c(-60.84128, +34.34082, 3.55968, 9.9372, 22.49228, 33.89956, 50.05576, 53.22377, +59.15038, 58.68728, 5.20131, 2.92457, 0.95333, 1.67812, 2.08476, +1.75341, 1.66439, 1.11958, 0.74766, 0.43332, -71.28075, 28.74975, +1.982, 6.919, 18.45, 30.43, 46.68, 50.84, 57.49, 57.69, -64.33, +32.3375, 2.881, 8.758, 21.04, 32.71, 48.95, 52.5, 58.69, 58.44, +-60.71, 34.27, 3.46, 9.849, 22.47, 33.91, 50.1, 53.31, 59.23, +58.74, -57.28, 36.3125, 4.132, 11.02, 23.92, 35.09, 51.21, 54.01, +59.6825, 59, -50.92, 40.26025, 5.69105, 13.43025, 26.64, 37.26, +53.13, 55.19025, 60.39, 59.36), .Dim = c(10L, 7L), .Dimnames = list( + c("alpha", "beta", "rhat[1]", "rhat[2]", "rhat[3]", "rhat[4]", + "rhat[5]", "rhat[6]", "rhat[7]", "rhat[8]"), c("mean", "sd", + "2.5%", "25%", "50%", "75%", "97.5%"))), structure(c(106.56037, +6.18615, 6.15259, 2.34291, 0.10596, 0.47872, 101.9, 5.977, 5.304, +105, 6.117, 5.817, 106.5, 6.187, 6.1185, 108.1, 6.255, 6.452, +111.1025, 6.397, 7.177), .Dim = c(3L, 7L), .Dimnames = list(c("mu.beta[1]", +"mu.beta[2]", "sigma"), c("mean", "sd", "2.5%", "25%", "50%", +"75%", "97.5%"))), structure(c(3.2445, 0.02929, 0.02929, 3.20989, +0.0081, 0.85113, -0.00963, -0.00963, 0.86281, 2.1011, 2.50802, +2.50802, 2.13451, 0.65922, 0.50825, 0.71045, 0.71045, 0.50962, +1.14395, -4.77203, -4.77203, 1.101, -0.9073, 0.22139, -1.40502, +-1.40502, 0.2234, 1.926, -1.638, -1.638, 1.917, -0.66862, 0.49587, +-0.48102, -0.48102, 0.50065, 2.6875, 0.04017, 0.04017, 2.663, +0.01868, 0.7305, -0.00773, -0.00773, 0.74375, 3.89225, 1.715, +1.715, 3.82125, 0.68585, 1.07, 0.4545, 0.4545, 1.10125, 8.5671, +4.82202, 4.82202, 8.5781, 0.9098, 2.13205, 1.40205, 1.40205, +2.18202), .Dim = c(9L, 7L), .Dimnames = list(c("Sigma2[1,1]", +"Sigma2[1,2]", "Sigma2[2,1]", "Sigma2[2,2]", "rho", "tau[1,1]", +"tau[1,2]", "tau[2,1]", "tau[2,2]"), c("mean", "sd", "2.5%", +"25%", "50%", "75%", "97.5%"))), structure(c(1.85767, 2.64973, +0.96989, 0.86209, 0.09887, 0.26392, 0.07107, 0.07684, 0.03153, +0.0148, 1.323, 2.528, 0.8224, 0.7898, 0.07502, 1.701, 2.604, +0.9188, 0.8457, 0.08841, 1.854, 2.642, 0.9689, 0.8646, 0.09723, +2.026, 2.691, 1.018, 0.8836, 0.1074, 2.36802, 2.802, 1.122, 0.9144, +0.1326), .Dim = c(5L, 7L), .Dimnames = list(c("U3", "alpha", +"beta", "gamma", "sigma"), c("mean", "sd", "2.5%", "25%", "50%", +"75%", "97.5%"))), structure(c(2399.81116, 2970.23731, 1526.76347, +9152.71052, 1072.50035, 22.42927, 0.01173, 1559, 1483, 573.04999, +2217, 1515, 1388.49991, 2748, 1526, 2769.24997, 3466, 1539, 10140.49952, +5596.37451, 1570), .Dim = c(3L, 7L), .Dimnames = list(c("sigma2.btw", +"sigma2.with", "theta"), c("mean", "sd", "2.5%", "25%", "50%", +"75%", "97.5%"))), structure(c(0.99767, 1.43476, -0.00865, -0.1804, +0.11034, 0.1406, 0.99274, 0.04825, 0.0552, 0.05217, 0.05175, +0.03333, 0.05436, 0.05185, 1, 1.327, -0.113, -0.2831, 0.06521, +0.04439, 0.8931, 1, 1.4, -0.04039, -0.2121, 0.08657, 0.1057, +0.9604, 1, 1.435, -0.00813, -0.1808, 0.1033, 0.1356, 0.9919, +1, 1.469, 0.02322, -0.1495, 0.12722, 0.169, 1.023, 1, 1.544, +0.0942, -0.07637, 0.1929, 0.2663, 1.099), .Dim = c(7L, 7L), .Dimnames = list( + c("equiv", "mu", "phi", "pi", "sigma1", "sigma2", "theta" + ), c("mean", "sd", "2.5%", "25%", "50%", "75%", "97.5%"))), + structure(c(0.6029, 0.3971, 536.75923, 548.90934, 3.75937, + 0.08421, 0.08421, 0.92221, 1.21365, 0.6111, 0.4326, 0.2359, + 535.1, 546.5, 2.917, 0.54737, 0.34, 536.2, 548.2, 3.36175, + 0.6039, 0.3961, 536.7, 548.9, 3.654, 0.66, 0.45262, 537.3, + 549.7, 4.019, 0.7641, 0.5674, 538.6, 551.2, 5.27107), .Dim = c(5L, + 7L), .Dimnames = list(c("P[1]", "P[2]", "lambda[1]", "lambda[2]", + "sigma"), c("mean", "sd", "2.5%", "25%", "50%", "75%", "97.5%" + ))), structure(c(2.99564, 0.79689, 1.02513, 0.56926, 0.39621, + 0.72729, 1.914, 0.04475, 0.4099, 2.743, 0.6218, 0.625, 2.997, + 0.7995, 0.82675, 3.255, 0.9782, 1.16825, 4.08502, 1.541, + 2.82), .Dim = c(3L, 7L), .Dimnames = list(c("alpha", "beta", + "sigma"), c("mean", "sd", "2.5%", "25%", "50%", "75%", "97.5%" + ))), structure(c(5.26374, 2.19866, -5.88024, 0.25869, 0.27042, + 0.2265, 7.82296, 0.1335, 0.16648, 0.14127, 0.11614, 0.137, + 0.1076, 1.18539, 4.996, 1.87997, -6.165, 0.1277, 0.1201, + 0.1085, 5.90897, 5.187, 2.094, -5.964, 0.1849, 0.1843, 0.1586, + 6.984, 5.264, 2.197, -5.879, 0.2318, 0.24, 0.2008, 7.684, + 5.342, 2.3, -5.795, 0.2995, 0.3184, 0.26312, 8.521, 5.529, + 2.535, -5.603, 0.54651, 0.6038, 0.495, 10.5), .Dim = c(7L, + 7L), .Dimnames = list(c("mu[1]", "mu[2]", "mu[3]", "sigma[1]", + "sigma[2]", "sigma[3]", "sigmaC"), c("mean", "sd", "2.5%", + "25%", "50%", "75%", "97.5%"))), structure(c(106.61227, 6.18568, + 6.0953, 3.63673, 0.1075, 0.46858, 99.40975, 5.97597, 5.27197, + 104.2, 6.114, 5.776, 106.6, 6.187, 6.058, 109.1, 6.258, 6.386, + 113.6, 6.394, 7.106), .Dim = c(3L, 7L), .Dimnames = list( + c("alpha0", "beta.c", "sigma"), c("mean", "sd", "2.5%", + "25%", "50%", "75%", "97.5%"))), structure(c(0.71462, + 1.2978, -0.15277, -39.85965, 0.0106, 0.05567, 0.3192, 0.0106, + 0.05567, 0.3192, 0.0106, 0.05567, 0.3192, 3.38943, 0.14307, + 0.38863, 0.16594, 12.71407, 0.10241, 0.22928, 0.46618, 0.10241, + 0.22928, 0.46618, 0.10241, 0.22928, 0.46618, 0.62795, 0.43279, + 0.529, -0.4842, -65.22025, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2.417, + 0.62217, 1.049, -0.26012, -48.11, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2.945, 0.7155, 1.294, -0.15245, -39.96, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 3.299, 0.8063, 1.545, -0.04546, -31.5775, 0, + 0, 1, 0, 0, 1, 0, 0, 1, 3.742, 0.9984, 2.076, 0.1763, -14.38925, + 0, 1, 1, 0, 1, 1, 0, 1, 1, 4.84702), .Dim = c(14L, 7L), .Dimnames = list( + c("b[1]", "b[2]", "b[3]", "b0", "outlier[3]", "outlier[4]", + "outlier[21]", "outlier[3]", "outlier[4]", "outlier[21]", + "outlier[3]", "outlier[4]", "outlier[21]", "sigma"), + c("mean", "sd", "2.5%", "25%", "50%", "75%", "97.5%"))), + structure(c(0.02054, 0.12633, 0.07461, 0.05794, 0.04233, + 0.07062, 0.06659, 0.14758, 0.07197, 0.09058, 0.11631, 0.06903, + 0.01981, 0.0272, 0.02389, 0.00813, 0.01381, 0.01821, 0.02022, + 0.02414, 0.01787, 0.02864, 0.01984, 0.01339, 0.00053, 0.07787, + 0.03467, 0.04313, 0.01952, 0.03927, 0.03268, 0.1034, 0.04114, + 0.0432, 0.08016, 0.04533, 0.00614, 0.107, 0.0575, 0.05223, + 0.03235, 0.05768, 0.05224, 0.1307, 0.05927, 0.06978, 0.1024, + 0.05962, 0.01446, 0.1246, 0.07216, 0.0576, 0.04099, 0.06919, + 0.06439, 0.1463, 0.07056, 0.08795, 0.1156, 0.06826, 0.02884, + 0.1438, 0.08924, 0.06318, 0.05081, 0.08204, 0.07907, 0.1635, + 0.08303, 0.1081, 0.1293, 0.07747, 0.07305, 0.1833, 0.1272, + 0.07477, 0.073, 0.1104, 0.1108, 0.1976, 0.1112, 0.1544, 0.1578, + 0.09787), .Dim = c(12L, 7L), .Dimnames = list(c("p[1]", "p[2]", + "p[3]", "p[4]", "p[5]", "p[6]", "p[7]", "p[8]", "p[9]", "p[10]", + "p[11]", "p[12]"), c("mean", "sd", "2.5%", "25%", "50%", + "75%", "97.5%"))), structure(c(0.05312, 0.10302, 0.07048, + 0.05924, 0.05155, 0.06905, 0.06683, 0.12337, 0.07011, 0.07828, + 0.10214, 0.06848, 0.07268, 0.40333, 0.01954, 0.02166, 0.01741, + 0.00786, 0.01312, 0.01486, 0.01593, 0.02261, 0.01464, 0.01993, + 0.01758, 0.01165, 0.0101, 0.1541, 0.01824, 0.06663, 0.03985, + 0.04467, 0.02805, 0.04259, 0.03845, 0.08327, 0.04392, 0.04419, + 0.07166, 0.04744, 0.05319, 0.1655, 0.03923, 0.08746, 0.05844, + 0.05381, 0.04215, 0.0587, 0.05584, 0.1072, 0.06004, 0.06443, + 0.08969, 0.06035, 0.06617, 0.2989, 0.05219, 0.101, 0.06913, + 0.05897, 0.05093, 0.0683, 0.06577, 0.1217, 0.06922, 0.07633, + 0.1009, 0.06796, 0.07253, 0.3818, 0.0656, 0.1163, 0.08104, + 0.06431, 0.06019, 0.07812, 0.07685, 0.1379, 0.07919, 0.08994, + 0.1132, 0.07595, 0.07898, 0.48342, 0.09467, 0.1511, 0.1088, + 0.07536, 0.07873, 0.101, 0.1011, 0.1716, 0.1015, 0.1226, + 0.1401, 0.09301, 0.09334, 0.76511), .Dim = c(14L, 7L), .Dimnames = list( + c("p[1]", "p[2]", "p[3]", "p[4]", "p[5]", "p[6]", "p[7]", + "p[8]", "p[9]", "p[10]", "p[11]", "p[12]", "pop.mean", + "sigma"), c("mean", "sd", "2.5%", "25%", "50%", "75%", + "97.5%")))) Property changes on: trunk/R2OpenBUGS/inst/validateInstallOpenBUGS/validOpenBUGSResults.R ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <snt...@us...> - 2010-10-02 12:53:22
|
Revision: 174 http://bugs-r.svn.sourceforge.net/bugs-r/?rev=174&view=rev Author: snthomas99 Date: 2010-10-02 12:53:15 +0000 (Sat, 02 Oct 2010) Log Message: ----------- trying to add validation code to R2OpenBUGS respository Modified Paths: -------------- trunk/R2OpenBUGS/DESCRIPTION trunk/R2OpenBUGS/NAMESPACE trunk/R2OpenBUGS/R/bugs.R trunk/R2OpenBUGS/R/bugs.run.R trunk/R2OpenBUGS/R/bugs.script.R trunk/R2OpenBUGS/man/bugs.Rd trunk/R2OpenBUGS/man/bugs.inits.Rd Added Paths: ----------- trunk/R2OpenBUGS/CreatevalidateOpenBUGS.R Added: trunk/R2OpenBUGS/CreatevalidateOpenBUGS.R =================================================================== --- trunk/R2OpenBUGS/CreatevalidateOpenBUGS.R (rev 0) +++ trunk/R2OpenBUGS/CreatevalidateOpenBUGS.R 2010-10-02 12:53:15 UTC (rev 174) @@ -0,0 +1,49 @@ +library(R2OpenBUGS) + +## Selected examples which take a few seconds in total to run + +test.models <- c("Air", "Asia", "Beetles", "BiRats", "Camel", + "Dugongs", "Dyes", "Equiv", "Eyes", + "Line", "OtreesMVN", "Rats", "Stacks", + "Surgical", "Surgicalrand") + +test.params <- list(Air = c("X", "theta"), + Asia = c("bronchitis", "either", "lung.cancer"), + Beetles = c("alpha", "beta", "rhat"), + BiRats = c("mu.beta", "sigma"), + Camel = c("Sigma2", "rho", "tau"), + Dugongs = c("U3","alpha", "beta", "gamma", "sigma"), + Dyes = c("sigma2.btw", "sigma2.with", "theta"), + Equiv = c("equiv", "mu", "phi", "pi","sigma1", "sigma2", "theta"), + Eyes = c("P", "lambda", "sigma"), + Line = c("alpha", "beta", "sigma"), + OtreesMVN = c("mu","sigma", "sigmaC"), + Rats = c("alpha0", "beta.c", "sigma"), + Stacks = c("b", "b0", "outlier[21]","outlier[3]", "outlier[4]", "sigma"), + Surgical = "p", + Surgicalrand = c("p","pop.mean", "sigma") + ) + +test.modelfile = paste(test.models,"model.txt",sep="") +test.modelfile<-file.path('C:/Program Files/OpenBUGS/OpenBUGS312/Examples',test.modelfile) +test.datafile = paste(test.models,"data.txt",sep="") +test.datafile<-file.path('C:/Program Files/OpenBUGS/OpenBUGS312/Examples',test.datafile) +test.inits = paste(test.models,"inits.txt",sep="") +test.inits<-file.path('C:/Program Files/OpenBUGS/OpenBUGS312/Examples',test.inits) + +### Test for posterior means within 1 percent of previously saved values + +res.true <- vector(mode="list",length=length(test.modelfile)) +for (i in seq(along=test.models)) { + res.true[[i]]<-round(bugs(data=test.datafile[i], inits=test.inits[i], + para=test.params[[test.models[i]]],model.file=test.modelfile[i], + n.burnin=5000, n.iter=20000, n.thin=1, n.chains=1, DIC=FALSE)$summary,5) + +} + +dput(res.true,'validOpenBUGSResults.R') + + + + + Property changes on: trunk/R2OpenBUGS/CreatevalidateOpenBUGS.R ___________________________________________________________________ Added: svn:executable + * Modified: trunk/R2OpenBUGS/DESCRIPTION =================================================================== --- trunk/R2OpenBUGS/DESCRIPTION 2010-10-02 12:50:38 UTC (rev 173) +++ trunk/R2OpenBUGS/DESCRIPTION 2010-10-02 12:53:15 UTC (rev 174) @@ -1,7 +1,7 @@ Package: R2OpenBUGS Title: Running OpenBUGS from R / S-PLUS -Date: 2010-08-5 -Version: 3.0-1 +Date: 2010-09-30 +Version: 3.1-2 Author: originally written as R2WinBUGS by Andrew Gelman <ge...@st...>; changes and packaged by Sibylle Sturtz <st...@st...> and Uwe Ligges <li...@st...>. Modified: trunk/R2OpenBUGS/NAMESPACE =================================================================== --- trunk/R2OpenBUGS/NAMESPACE 2010-10-02 12:50:38 UTC (rev 173) +++ trunk/R2OpenBUGS/NAMESPACE 2010-10-02 12:53:15 UTC (rev 174) @@ -10,7 +10,8 @@ bugs.log, monitor, as.bugs.array, - write.model) + write.model, + validateInstallOpenBUGS) S3method(print, bugs) S3method(plot, bugs) Modified: trunk/R2OpenBUGS/R/bugs.R =================================================================== --- trunk/R2OpenBUGS/R/bugs.R 2010-10-02 12:50:38 UTC (rev 173) +++ trunk/R2OpenBUGS/R/bugs.R 2010-10-02 12:53:15 UTC (rev 174) @@ -5,7 +5,7 @@ OpenBUGS.pgm=ifelse(.Platform$OS.type == "windows" | useWINE==TRUE, paste("C:/Program Files/OpenBUGS/OpenBUGS", version,"/OpenBUGS.exe",sep=""),"OpenBUGS"), - version='311', + version='312', working.directory=NULL, clearWD=FALSE, useWINE=FALSE, WINE=NULL, newWINE=TRUE, WINEPATH=NULL, bugs.seed=1, summary.only=FALSE, Modified: trunk/R2OpenBUGS/R/bugs.run.R =================================================================== --- trunk/R2OpenBUGS/R/bugs.run.R 2010-10-02 12:50:38 UTC (rev 173) +++ trunk/R2OpenBUGS/R/bugs.run.R 2010-10-02 12:53:15 UTC (rev 174) @@ -27,6 +27,7 @@ native2win(file.path(getwd(), "script.txt"), useWINE=useWINE, newWINE=newWINE, WINEPATH=WINEPATH), "\" /", sep="") + if(!debug)bugsCall<-paste(bugsCall,"HEADLESS",sep="") if(useWINE) bugsCall <- paste(WINE, bugsCall) }else{ bugsCall <- paste(OpenBUGS.pgm, "<", "script.txt", ">", file.path(getwd(), "log.txt")) Modified: trunk/R2OpenBUGS/R/bugs.script.R =================================================================== --- trunk/R2OpenBUGS/R/bugs.script.R 2010-10-02 12:50:38 UTC (rev 173) +++ trunk/R2OpenBUGS/R/bugs.script.R 2010-10-02 12:53:15 UTC (rev 174) @@ -46,7 +46,8 @@ bugs.seed.cmd <- paste("modelSetRN(", bugs.seed, ")\n", sep="") } - thinUpdate <- paste("modelUpdate(", n.burnin, ",", n.thin, ")\n", sep="") + thinUpdate <- paste("modelUpdate(", formatC(n.burnin, format='d'), ",", n.thin, + ",",formatC(n.burnin, format='d'), ")\n", sep="") cat( if(.Platform$OS.type == "windows" | useWINE) "modelDisplay('log')\n", @@ -61,7 +62,8 @@ savelist, summarylist, if(DIC) "dicSet()\n", - "modelUpdate(", n.iter-n.burnin, ",", n.thin, ")\n", + "modelUpdate(", formatC(n.iter-n.burnin, format='d'), ",", n.thin, + ",",formatC(n.iter-n.burnin, format='d'),")\n", "samplesCoda('*', '", coda, "')\n", "summaryStats('*')\n", if(DIC) "dicStats()\n", Modified: trunk/R2OpenBUGS/man/bugs.Rd =================================================================== --- trunk/R2OpenBUGS/man/bugs.Rd 2010-10-02 12:50:38 UTC (rev 173) +++ trunk/R2OpenBUGS/man/bugs.Rd 2010-10-02 12:53:15 UTC (rev 174) @@ -13,7 +13,7 @@ OpenBUGS.pgm=ifelse(.Platform$OS.type == "windows" | useWINE==TRUE, paste("C:/Program Files/OpenBUGS/OpenBUGS", version,"/OpenBUGS.exe",sep=""),"OpenBUGS"), - version='311', + version='312', working.directory=NULL, clearWD=FALSE, useWINE=FALSE, WINE=NULL, newWINE=TRUE, WINEPATH=NULL, bugs.seed=1, summary.only=FALSE, @@ -100,7 +100,9 @@ \item{WINEPATH}{Character, path to \file{winepath} binary file, it is tried hard (by a guess and the utilities \code{which} and \code{locate}) to get the information automatically if not given.} - \item{bugs.seed}{Random seed for \pkg{OpenBUGS}}. + \item{bugs.seed}{Random seed for \pkg{OpenBUGS}. Must be an integer between 1-14. Seed + specification changed between WinBUGS and OpenBUGS; see the OpenBUGS documentation for + details}. \item{summary.only}{If \code{TRUE}, only a parameter summary for very quick analyses is given, temporary created files are not removed in that case.} \item{save.history}{If \code{TRUE} (the default), trace plots are generated at the end.} Modified: trunk/R2OpenBUGS/man/bugs.inits.Rd =================================================================== --- trunk/R2OpenBUGS/man/bugs.inits.Rd 2010-10-02 12:50:38 UTC (rev 173) +++ trunk/R2OpenBUGS/man/bugs.inits.Rd 2010-10-02 12:53:15 UTC (rev 174) @@ -16,7 +16,7 @@ \item{n.chains}{number of Markov chains} \item{digits}{number of significant digits used for \pkg{OpenBUGS} input, see \code{\link{formatC}}} - \item{inits.file}{name for the inits files R write the inits into.} + \item{inits.files}{name for the inits files R write the inits into.} } \value{Vector of names of \code{inits.files}; as a side effect, the inits files \file{inits*.txt} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <snt...@us...> - 2010-10-02 12:50:44
|
Revision: 173 http://bugs-r.svn.sourceforge.net/bugs-r/?rev=173&view=rev Author: snthomas99 Date: 2010-10-02 12:50:38 +0000 (Sat, 02 Oct 2010) Log Message: ----------- numerous bug fixes, validation code added, version numbers for 3.1.2 Modified Paths: -------------- trunk/R2OpenBUGS/inst/NEWS Modified: trunk/R2OpenBUGS/inst/NEWS =================================================================== --- trunk/R2OpenBUGS/inst/NEWS 2010-09-16 02:54:33 UTC (rev 172) +++ trunk/R2OpenBUGS/inst/NEWS 2010-10-02 12:50:38 UTC (rev 173) @@ -1,6 +1,14 @@ Changes to R2OpenBUGS: ====================== +Update 3.1-2 +- Set default version of OpenBUGS to 3.1.2 +- Fixed upper/lower case error in read.bugs +- Fixed bug in specification of n.iter with large values in bugs +- Added test suite +- Several other less noticeable bugs fixed + + Update 3.0-1 - Converted R2WinBUGS to use OpenBUGS scripts and eliminated BRugs calls. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <snt...@us...> - 2010-09-16 02:54:39
|
Revision: 172 http://bugs-r.svn.sourceforge.net/bugs-r/?rev=172&view=rev Author: snthomas99 Date: 2010-09-16 02:54:33 +0000 (Thu, 16 Sep 2010) Log Message: ----------- Corrected bug in bugs.log and corrected some documentation Modified Paths: -------------- trunk/R2OpenBUGS/R/bugs.log.R trunk/R2OpenBUGS/man/bugs.data.Rd trunk/R2OpenBUGS/man/bugs.inits.Rd trunk/R2OpenBUGS/man/read.bugs.Rd Modified: trunk/R2OpenBUGS/R/bugs.log.R =================================================================== --- trunk/R2OpenBUGS/R/bugs.log.R 2010-09-14 15:19:26 UTC (rev 171) +++ trunk/R2OpenBUGS/R/bugs.log.R 2010-09-16 02:54:33 UTC (rev 172) @@ -29,7 +29,7 @@ dimnames(m) <- list(row.names, col.names) return(m) } - stats <- extract(log.txt, "Node statistics") - DIC <- extract(log.txt, "DIC", skip=1, empty.left.col=FALSE) + stats <- extract(log.txt, "Summary statistics") + DIC <- extract(log.txt, "Deviance information", skip=0, empty.left.col=FALSE) list(stats=stats, DIC=DIC) } Modified: trunk/R2OpenBUGS/man/bugs.data.Rd =================================================================== --- trunk/R2OpenBUGS/man/bugs.data.Rd 2010-09-14 15:19:26 UTC (rev 171) +++ trunk/R2OpenBUGS/man/bugs.data.Rd 2010-09-16 02:54:33 UTC (rev 172) @@ -2,8 +2,7 @@ \alias{bugs.data} \title{Writing input for OpenBUGS} -\description{Write file for \pkg{OpenBUGS} to read - for - internal use.} +\description{Write file for \pkg{OpenBUGS} to read.} \usage{ bugs.data(data, dir = getwd(), digits = 5, data.file = "data.txt") @@ -23,6 +22,5 @@ the data file is written} \seealso{The main function to be called by the user is \code{\link{bugs}}.} -\keyword{internal} \keyword{file} \keyword{IO} Modified: trunk/R2OpenBUGS/man/bugs.inits.Rd =================================================================== --- trunk/R2OpenBUGS/man/bugs.inits.Rd 2010-09-14 15:19:26 UTC (rev 171) +++ trunk/R2OpenBUGS/man/bugs.inits.Rd 2010-09-16 02:54:33 UTC (rev 172) @@ -1,9 +1,9 @@ \name{bugs.inits} \alias{bugs.inits} -\title{Writing input for OpenBUGS - intended for internal use only} +\title{Writing input for OpenBUGS } \description{Write files \file{inits1.txt}, \file{inits2.txt}, etc., in - the working directory for \pkg{OpenBUGS} to read - for internal use.} + the working directory for \pkg{OpenBUGS} to read } \usage{ bugs.inits(inits, n.chains, digits, @@ -23,6 +23,5 @@ are written} \seealso{The main function to be called by the user is \code{\link{bugs}}.} -\keyword{internal} \keyword{IO} \keyword{file} Modified: trunk/R2OpenBUGS/man/read.bugs.Rd =================================================================== --- trunk/R2OpenBUGS/man/read.bugs.Rd 2010-09-14 15:19:26 UTC (rev 171) +++ trunk/R2OpenBUGS/man/read.bugs.Rd 2010-09-16 02:54:33 UTC (rev 172) @@ -16,7 +16,7 @@ \code{\link{bugs}} in call such as \code{bugs(....., codaPkg=TRUE, .....)}). Each of the files contains coda output for one chain produced by \pkg{OpenBUGS}, the \emph{directory} name of the corresponding - file \file{codaIndex.txt} is extracted from the first element of + file \file{CODAindex.txt} is extracted from the first element of \code{codafiles}.} \item{...}{further arguments to be passed to \code{\link[coda]{read.coda}}} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <li...@us...> - 2010-09-14 15:19:33
|
Revision: 171 http://bugs-r.svn.sourceforge.net/bugs-r/?rev=171&view=rev Author: ligges Date: 2010-09-14 15:19:26 +0000 (Tue, 14 Sep 2010) Log Message: ----------- minor improvement for handling scalar logicals Modified Paths: -------------- trunk/R2OpenBUGS/R/bugs.run.R Modified: trunk/R2OpenBUGS/R/bugs.run.R =================================================================== --- trunk/R2OpenBUGS/R/bugs.run.R 2010-09-09 09:11:53 UTC (rev 170) +++ trunk/R2OpenBUGS/R/bugs.run.R 2010-09-14 15:19:26 UTC (rev 171) @@ -22,16 +22,16 @@ ## Call Bugs and have it run with script.txt - if(.Platform$OS.type == "windows" | useWINE==TRUE){ + if(.Platform$OS.type == "windows" || useWINE){ bugsCall <- paste("\"", OpenBUGS.pgm, "\" /PAR \"", native2win(file.path(getwd(), "script.txt"), useWINE=useWINE, newWINE=newWINE, WINEPATH=WINEPATH), "\" /", sep="") if(useWINE) bugsCall <- paste(WINE, bugsCall) }else{ - bugsCall<-paste(OpenBUGS.pgm,"<","script.txt",">",file.path(getwd(),"log.txt")) + bugsCall <- paste(OpenBUGS.pgm, "<", "script.txt", ">", file.path(getwd(), "log.txt")) } - if((.Platform$OS.type == "windows" | useWINE==TRUE) & debug){ + if((.Platform$OS.type == "windows" || useWINE) && debug){ temp <- system(bugsCall,invisible=FALSE) }else temp <- system(bugsCall) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2010-09-09 09:11:59
|
Revision: 170 http://bugs-r.svn.sourceforge.net/bugs-r/?rev=170&view=rev Author: chris-jackson Date: 2010-09-09 09:11:53 +0000 (Thu, 09 Sep 2010) Log Message: ----------- LDFLAGS added to BugsHelper compile command Modified Paths: -------------- branches/linux/BRugs/.Rbuildignore branches/linux/BRugs/src/Makevars Modified: branches/linux/BRugs/.Rbuildignore =================================================================== --- branches/linux/BRugs/.Rbuildignore 2010-09-02 16:44:16 UTC (rev 169) +++ branches/linux/BRugs/.Rbuildignore 2010-09-09 09:11:53 UTC (rev 170) @@ -1 +1,2 @@ inst/README-inst_OpenBUGS +exec/BugsHelper Modified: branches/linux/BRugs/src/Makevars =================================================================== --- branches/linux/BRugs/src/Makevars 2010-09-02 16:44:16 UTC (rev 169) +++ branches/linux/BRugs/src/Makevars 2010-09-09 09:11:53 UTC (rev 170) @@ -1,2 +1,2 @@ BugsHelper: - $(CC) $(CFLAGS) -m32 -Wl,-rpath=\$$ORIGIN/../OpenBUGS BugsHelper.c ../inst/OpenBUGS/libOpenBUGS.so -o ../exec/BugsHelper + $(CC) $(CFLAGS) $(LDFLAGS) -m32 -Wl,-rpath=\$$ORIGIN/../OpenBUGS BugsHelper.c ../inst/OpenBUGS/libOpenBUGS.so -o ../exec/BugsHelper This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <snt...@us...> - 2010-09-02 16:44:25
|
Revision: 169 http://bugs-r.svn.sourceforge.net/bugs-r/?rev=169&view=rev Author: snthomas99 Date: 2010-09-02 16:44:16 +0000 (Thu, 02 Sep 2010) Log Message: ----------- added invisible to system call in bugs.run to display openbugs gui Modified Paths: -------------- trunk/R2OpenBUGS/R/bugs.R trunk/R2OpenBUGS/R/bugs.run.R trunk/R2OpenBUGS/man/bugs.run.Rd Modified: trunk/R2OpenBUGS/R/bugs.R =================================================================== --- trunk/R2OpenBUGS/R/bugs.R 2010-09-01 01:42:02 UTC (rev 168) +++ trunk/R2OpenBUGS/R/bugs.R 2010-09-02 16:44:16 UTC (rev 169) @@ -140,7 +140,7 @@ summary.only=summary.only, save.history=save.history, bugs.data.file = bugs.data.file, bugs.inits.files = bugs.inits.files, over.relax = over.relax) - bugs.run(n.burnin, OpenBUGS.pgm, WINE=WINE, useWINE=useWINE, + bugs.run(n.burnin, OpenBUGS.pgm, debug=debug, WINE=WINE, useWINE=useWINE, newWINE=newWINE, WINEPATH=WINEPATH) if(codaPkg) return(file.path(getwd(), paste("CODAchain", 1:n.chains, ".txt", sep=""))) Modified: trunk/R2OpenBUGS/R/bugs.run.R =================================================================== --- trunk/R2OpenBUGS/R/bugs.run.R 2010-09-01 01:42:02 UTC (rev 168) +++ trunk/R2OpenBUGS/R/bugs.run.R 2010-09-02 16:44:16 UTC (rev 169) @@ -1,5 +1,5 @@ "bugs.run" <- - function(n.burnin, OpenBUGS.pgm, + function(n.burnin, OpenBUGS.pgm, debug=FALSE, useWINE=FALSE, WINE=NULL, newWINE=TRUE, WINEPATH=NULL) { @@ -31,7 +31,10 @@ }else{ bugsCall<-paste(OpenBUGS.pgm,"<","script.txt",">",file.path(getwd(),"log.txt")) } - temp <- system(bugsCall) + if((.Platform$OS.type == "windows" | useWINE==TRUE) & debug){ + temp <- system(bugsCall,invisible=FALSE) + }else temp <- system(bugsCall) + if(temp == -1) stop("Error in bugs.run().") Modified: trunk/R2OpenBUGS/man/bugs.run.Rd =================================================================== --- trunk/R2OpenBUGS/man/bugs.run.Rd 2010-09-01 01:42:02 UTC (rev 168) +++ trunk/R2OpenBUGS/man/bugs.run.Rd 2010-09-02 16:44:16 UTC (rev 169) @@ -7,13 +7,14 @@ internal use} \usage{ -bugs.run(n.burnin, OpenBUGS.pgm, +bugs.run(n.burnin, OpenBUGS.pgm, debug=FALSE, useWINE=FALSE, WINE=NULL, newWINE=TRUE, WINEPATH=NULL) } \arguments{ \item{n.burnin}{length of burn in} \item{OpenBUGS.pgm}{Full path to the \pkg{OpenBUGS} executable or shell script} + \item{debug}{When debug=T, the OpenBUGS gui is displayed during execution. there is no effect with linux execution} \item{useWINE}{as in \code{\link{bugs}} meta function} \item{WINE}{as in \code{\link{bugs}} meta function} \item{newWINE}{as in \code{\link{bugs}} meta function} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <snt...@us...> - 2010-09-01 01:42:09
|
Revision: 168 http://bugs-r.svn.sourceforge.net/bugs-r/?rev=168&view=rev Author: snthomas99 Date: 2010-09-01 01:42:02 +0000 (Wed, 01 Sep 2010) Log Message: ----------- Changed case of codaIndex in read.bugs.R Modified Paths: -------------- trunk/R2OpenBUGS/R/read.bugs.R Modified: trunk/R2OpenBUGS/R/read.bugs.R =================================================================== --- trunk/R2OpenBUGS/R/read.bugs.R 2010-08-18 14:45:01 UTC (rev 167) +++ trunk/R2OpenBUGS/R/read.bugs.R 2010-09-01 01:42:02 UTC (rev 168) @@ -2,6 +2,6 @@ if(!is.R() && !require("coda")) stop("package 'coda' is required to use this function") mcmc.list(lapply(codafiles, read.coda, - index.file = file.path(dirname(codafiles[1]), "codaIndex.txt"), + index.file = file.path(dirname(codafiles[1]), "CODAindex.txt"), ...)) } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2010-08-18 14:45:08
|
Revision: 167 http://bugs-r.svn.sourceforge.net/bugs-r/?rev=167&view=rev Author: chris-jackson Date: 2010-08-18 14:45:01 +0000 (Wed, 18 Aug 2010) Log Message: ----------- Ignore the warning about the last line of the log file not ending with a newline. Modified Paths: -------------- trunk/R2OpenBUGS/R/bugs.log.R trunk/R2WinBUGS/R/bugs.log.R Modified: trunk/R2OpenBUGS/R/bugs.log.R =================================================================== --- trunk/R2OpenBUGS/R/bugs.log.R 2010-08-16 22:30:16 UTC (rev 166) +++ trunk/R2OpenBUGS/R/bugs.log.R 2010-08-18 14:45:01 UTC (rev 167) @@ -8,7 +8,7 @@ if(!file.exists(file)) stop("Log file", file, "does not exist") - log.txt <- readLines(file) + log.txt <- readLines(file, warn=FALSE) extract <- function (m, line.match, skip=0, empty.left.col=TRUE) { start <- (skip + which(m == line.match)[1]) if(is.na(start)) return(NA) Modified: trunk/R2WinBUGS/R/bugs.log.R =================================================================== --- trunk/R2WinBUGS/R/bugs.log.R 2010-08-16 22:30:16 UTC (rev 166) +++ trunk/R2WinBUGS/R/bugs.log.R 2010-08-18 14:45:01 UTC (rev 167) @@ -8,7 +8,7 @@ if(!file.exists(file)) stop("Log file", file, "does not exist") - log.txt <- readLines(file) + log.txt <- readLines(file, warn=FALSE) extract <- function (m, line.match, skip=0, empty.left.col=TRUE) { start <- (skip + which(m == line.match)[1]) if(is.na(start)) return(NA) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |