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: <li...@us...> - 2010-05-02 18:45:54
|
Revision: 142 http://bugs-r.svn.sourceforge.net/bugs-r/?rev=142&view=rev Author: ligges Date: 2010-05-02 18:45:44 +0000 (Sun, 02 May 2010) Log Message: ----------- make R CMD check even more happy Modified Paths: -------------- trunk/BRugs/src/Makevars Modified: trunk/BRugs/src/Makevars =================================================================== --- trunk/BRugs/src/Makevars 2010-05-02 17:48:46 UTC (rev 141) +++ trunk/BRugs/src/Makevars 2010-05-02 18:45:44 UTC (rev 142) @@ -1,2 +1,2 @@ copylib: - $(CP) ../inst/OpenBUGS/libOpenBUGS.so ./BRugs.so + $(CP) ../inst/OpenBUGS/libOpenBUGS.so ./BRugs.so This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <li...@us...> - 2010-05-02 17:48:52
|
Revision: 141 http://bugs-r.svn.sourceforge.net/bugs-r/?rev=141&view=rev Author: ligges Date: 2010-05-02 17:48:46 +0000 (Sun, 02 May 2010) Log Message: ----------- OpenBUGS manuals are no longer available in pdf format Removed Paths: ------------- trunk/BRugs/inst/docs/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <li...@us...> - 2010-05-02 15:42:23
|
Revision: 140 http://bugs-r.svn.sourceforge.net/bugs-r/?rev=140&view=rev Author: ligges Date: 2010-05-02 15:42:17 +0000 (Sun, 02 May 2010) Log Message: ----------- fix dimensions to report the number of dimensions of a BUGS node Modified Paths: -------------- trunk/BRugs/R/dimensions.R Modified: trunk/BRugs/R/dimensions.R =================================================================== --- trunk/BRugs/R/dimensions.R 2010-05-02 14:40:19 UTC (rev 139) +++ trunk/BRugs/R/dimensions.R 2010-05-02 15:42:17 UTC (rev 140) @@ -5,17 +5,9 @@ nodeLabel <- as.character(node) if(!(nodeLabel %in% modelNames())) stop("node must be a variable name from the model") - command <- "BugsRobjects.Set" - .C("CharArray", command, nchar(command), as.character(nodeLabel), - nchar(nodeLabel), integer(1), PACKAGE="BRugs") - command <- "BugsRobjects.NumSlots" - numSlots <- .Integer(command) - dimensions <- integer(numSlots) - command <- "BugsRobjects.Dimensions" - if (numSlots > 0) - dimensions <- .C("IntegerArray", command, nchar(command), - as.integer(dimensions), as.integer(numSlots), - integer(1), PACKAGE="BRugs")[[3]] - else dimensions <- NULL + command <- "BugsRobjects.SetVariable" + .C("CharArray", command, nchar(command), nodeLabel, nchar(nodeLabel), integer(1), PACKAGE="BRugs") + command <- "BugsRobjects.GetNumDimensions" + dimensions <- .Integer(command) return(dimensions) } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <li...@us...> - 2010-05-02 14:40:25
|
Revision: 139 http://bugs-r.svn.sourceforge.net/bugs-r/?rev=139&view=rev Author: ligges Date: 2010-05-02 14:40:19 +0000 (Sun, 02 May 2010) Log Message: ----------- make R CMD build and R CMD check happy Modified Paths: -------------- trunk/BRugs/man/model.precision.Rd trunk/BRugs/src/Makevars Modified: trunk/BRugs/man/model.precision.Rd =================================================================== --- trunk/BRugs/man/model.precision.Rd 2010-05-02 14:21:32 UTC (rev 138) +++ trunk/BRugs/man/model.precision.Rd 2010-05-02 14:40:19 UTC (rev 139) @@ -6,7 +6,7 @@ modelPrecision(prec) } \arguments{ - \item{prec}{} + \item{prec}{precision used in the figures} } \details{It does not affect the precision of any calculations!} \seealso{\code{\link{BRugs}}, \code{\link{help.WinBUGS}}} Modified: trunk/BRugs/src/Makevars =================================================================== --- trunk/BRugs/src/Makevars 2010-05-02 14:21:32 UTC (rev 138) +++ trunk/BRugs/src/Makevars 2010-05-02 14:40:19 UTC (rev 139) @@ -1,2 +1,2 @@ -copylib: +copylib: $(CP) ../inst/OpenBUGS/libOpenBUGS.so ./BRugs.so This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <li...@us...> - 2010-05-02 14:21:38
|
Revision: 138 http://bugs-r.svn.sourceforge.net/bugs-r/?rev=138&view=rev Author: ligges Date: 2010-05-02 14:21:32 +0000 (Sun, 02 May 2010) Log Message: ----------- make clearer where to put OpenBUGS files Modified Paths: -------------- trunk/BRugs/inst/README-inst_OpenBUGS Added Paths: ----------- trunk/BRugs/inst/OpenBUGS/ Modified: trunk/BRugs/inst/README-inst_OpenBUGS =================================================================== --- trunk/BRugs/inst/README-inst_OpenBUGS 2010-05-02 14:09:53 UTC (rev 137) +++ trunk/BRugs/inst/README-inst_OpenBUGS 2010-05-02 14:21:32 UTC (rev 138) @@ -3,7 +3,7 @@ REM REM OpenBUGS REM OpenBUGS/libOpenBUGS.dll -REM OpenBUGS/libOpenBUGS.sop +REM OpenBUGS/libOpenBUGS.so REM OpenBUGS/libtaucs.dll REM OpenBUGS/Examples/*.bmp REM OpenBUGS/Examples/*.html This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <li...@us...> - 2010-05-02 14:10:00
|
Revision: 137 http://bugs-r.svn.sourceforge.net/bugs-r/?rev=137&view=rev Author: ligges Date: 2010-05-02 14:09:53 +0000 (Sun, 02 May 2010) Log Message: ----------- copy dll via Makevars for future R > 2.12.0 compatibility (with multiple architectures available such as 32 vs 64 bit) Modified Paths: -------------- trunk/BRugs/configure.win trunk/BRugs/inst/README-inst_OpenBUGS Added Paths: ----------- trunk/BRugs/src/ trunk/BRugs/src/Makevars trunk/BRugs/src/Makevars.win Modified: trunk/BRugs/configure.win =================================================================== --- trunk/BRugs/configure.win 2010-04-30 19:59:31 UTC (rev 136) +++ trunk/BRugs/configure.win 2010-05-02 14:09:53 UTC (rev 137) @@ -1,8 +0,0 @@ -#!/bin/sh - -if test -z "$R_PACKAGE_DIR" ; then - R_PACKAGE_DIR=${DPKG} -fi -mkdir ${R_PACKAGE_DIR}/libs -cp ./inst/OpenBUGS/brugs.dll ${R_PACKAGE_DIR}/libs/BRugs.dll - Modified: trunk/BRugs/inst/README-inst_OpenBUGS =================================================================== --- trunk/BRugs/inst/README-inst_OpenBUGS 2010-04-30 19:59:31 UTC (rev 136) +++ trunk/BRugs/inst/README-inst_OpenBUGS 2010-05-02 14:09:53 UTC (rev 137) @@ -2,8 +2,8 @@ REM for BRugs from the current OpenBUGS distribution: REM REM OpenBUGS -REM OpenBUGS/brugs.dll -REM OpenBUGS/brugs.so +REM OpenBUGS/libOpenBUGS.dll +REM OpenBUGS/libOpenBUGS.sop REM OpenBUGS/libtaucs.dll REM OpenBUGS/Examples/*.bmp REM OpenBUGS/Examples/*.html @@ -23,8 +23,8 @@ mkdir Examples Developer Manuals REM Copy the files -cp -f %OpenBUGS%/libOpenBUGS.dll BRugs.dll -cp -f %OpenBUGS%/libOpenBUGS.so BRugs.so +cp -f %OpenBUGS%/libOpenBUGS.dll . +cp -f %OpenBUGS%/libOpenBUGS.so . cp -f %OpenBUGS%/libtaucs.dll . cp -f %OpenBUGS%/Examples/{*.bmp,*.html,*.txt} Examples/. cp -f %OpenBUGS%/Developer/{*.bmp,*.html} Developer/. Added: trunk/BRugs/src/Makevars =================================================================== --- trunk/BRugs/src/Makevars (rev 0) +++ trunk/BRugs/src/Makevars 2010-05-02 14:09:53 UTC (rev 137) @@ -0,0 +1,2 @@ +copylib: + $(CP) ../inst/OpenBUGS/libOpenBUGS.so ./BRugs.so Added: trunk/BRugs/src/Makevars.win =================================================================== --- trunk/BRugs/src/Makevars.win (rev 0) +++ trunk/BRugs/src/Makevars.win 2010-05-02 14:09:53 UTC (rev 137) @@ -0,0 +1,2 @@ +copylib: + $(CP) ../inst/OpenBUGS/libOpenBUGS.dll ./BRugs.dll This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Uwe L. <li...@st...> - 2010-04-30 20:24:29
|
Dear Dawn, Bill, not sure whom to ask, but you may know: Dawn, are you working for Tibco these days?? Bill, is Tibco interested in new BRugs versions for S-PLUS? I just found that BRugs on CSAN is in version 0.4-2 while 0.5-x is on CRAN extras. Moreover, we are migrating to OpenBUGS 3.0.8 (and later) now. This may involve some major changes. If the S-PLUS community / Tibco is not interested, it would make life easier for us not to guarantee S-PLUS support. I do not have any S-PLUS version around any more and I have to admit that I am not too interested in trying it out again, since that simply costs too much time that I do not have anymore ... If you are still interested, we need someone on your (Tibco) side with recent versions of S-PLUS to support the development and run checks and help to fix bugs when things get closer to some release. Best wishes, Uwe |
From: <li...@us...> - 2010-04-30 19:59:37
|
Revision: 136 http://bugs-r.svn.sourceforge.net/bugs-r/?rev=136&view=rev Author: ligges Date: 2010-04-30 19:59:31 +0000 (Fri, 30 Apr 2010) Log Message: ----------- first changes for OpenBUGS 3.0.8 Modified Paths: -------------- trunk/BRugs/DESCRIPTION trunk/BRugs/NEWS trunk/BRugs/R/zzz.R Modified: trunk/BRugs/DESCRIPTION =================================================================== --- trunk/BRugs/DESCRIPTION 2010-04-30 19:21:43 UTC (rev 135) +++ trunk/BRugs/DESCRIPTION 2010-04-30 19:59:31 UTC (rev 136) @@ -1,7 +1,7 @@ Package: BRugs Title: OpenBUGS and its R / S-PLUS interface BRugs -Version: 0.5-3 -Date: 2009-11-06 +Version: 0.6-0 +Date: 2010-04-30 Author: The Chief Software Bug is Andrew Thomas, with web assistance from Real Bug Bob O'Hara. Other members of the BUGS team are statisticians David Spiegelhalter, Nicky Best, Dave Lunn and Ken Rice. Dave Lunn has also made major contributions to the software development. 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 <gre...@bf...>. Description: An R / S-PLUS package containing OpenBUGS and its R / S-PLUS interface BRugs. Maintainer: Uwe Ligges <li...@st...> @@ -9,4 +9,4 @@ Archs: i386 OS_type: windows License: GPL-2 -URL: http://mathstat.helsinki.fi/openbugs/ +URL: http://www.openbugs.info/ Modified: trunk/BRugs/NEWS =================================================================== --- trunk/BRugs/NEWS 2010-04-30 19:21:43 UTC (rev 135) +++ trunk/BRugs/NEWS 2010-04-30 19:59:31 UTC (rev 136) @@ -1,6 +1,10 @@ Changes to BRugs: ===================== +Update 0.6-0 +- Switch to new OpenBUGS (currently 3.0.8) +- 32-bit versions only + Update 0.5-3 - fix writeModel() again by going through parse tree now - fix buildMCMC() to report right thinning parameters and keep all samples Modified: trunk/BRugs/R/zzz.R =================================================================== --- trunk/BRugs/R/zzz.R 2010-04-30 19:21:43 UTC (rev 135) +++ trunk/BRugs/R/zzz.R 2010-04-30 19:59:31 UTC (rev 136) @@ -6,7 +6,7 @@ ## we do have a NAMESPACE now: library.dynam("BRugs", pkg, lib) len <- nchar(root) tempDir <- gsub("\\\\", "/", tempdir()) - .C("SetRoot", as.character(root), len, PACKAGE="BRugs") + .C("SetWorkingDir", as.character(root), len, PACKAGE="BRugs") .C("SetTempDir", as.character(tempDir), nchar(tempDir), PACKAGE="BRugs") command <- "BugsMappers.SetDest(2)" .CmdInterpreter(command) @@ -15,7 +15,7 @@ } ".onAttach" <- function(lib, pkg){ - message("Welcome to BRugs running on OpenBUGS version 3.0.3") + message("Welcome to BRugs running on OpenBUGS version 3.0.8") } ".onUnload" <- function(libpath){ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <li...@us...> - 2010-04-30 19:21:49
|
Revision: 135 http://bugs-r.svn.sourceforge.net/bugs-r/?rev=135&view=rev Author: ligges Date: 2010-04-30 19:21:43 +0000 (Fri, 30 Apr 2010) Log Message: ----------- 32-bit only Modified Paths: -------------- trunk/BRugs/DESCRIPTION Modified: trunk/BRugs/DESCRIPTION =================================================================== --- trunk/BRugs/DESCRIPTION 2010-03-18 16:28:46 UTC (rev 134) +++ trunk/BRugs/DESCRIPTION 2010-04-30 19:21:43 UTC (rev 135) @@ -6,6 +6,7 @@ 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 +Archs: i386 OS_type: windows License: GPL-2 URL: http://mathstat.helsinki.fi/openbugs/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <li...@us...> - 2010-03-18 16:29:04
|
Revision: 134 http://bugs-r.svn.sourceforge.net/bugs-r/?rev=134&view=rev Author: ligges Date: 2010-03-18 16:28:46 +0000 (Thu, 18 Mar 2010) Log Message: ----------- bug fixed as reported by S. McKay Curtis Modified Paths: -------------- trunk/R2WinBUGS/DESCRIPTION trunk/R2WinBUGS/R/as.bugs.array.R trunk/R2WinBUGS/inst/NEWS Modified: trunk/R2WinBUGS/DESCRIPTION =================================================================== --- trunk/R2WinBUGS/DESCRIPTION 2009-11-08 19:35:59 UTC (rev 133) +++ trunk/R2WinBUGS/DESCRIPTION 2010-03-18 16:28:46 UTC (rev 134) @@ -1,7 +1,7 @@ Package: R2WinBUGS Title: Running WinBUGS and OpenBUGS from R / S-PLUS -Date: 2009-11-06 -Version: 2.1-16 +Date: 2010-03-18 +Version: 2.1-17 Author: originally written by Andrew Gelman <ge...@st...>; changes and packaged by Sibylle Sturtz <st...@st...> and Uwe Ligges <li...@st...>. Modified: trunk/R2WinBUGS/R/as.bugs.array.R =================================================================== --- trunk/R2WinBUGS/R/as.bugs.array.R 2009-11-08 19:35:59 UTC (rev 133) +++ trunk/R2WinBUGS/R/as.bugs.array.R 2010-03-18 16:28:46 UTC (rev 134) @@ -52,10 +52,11 @@ n.indexes.short[[j]][k] <- length(unique(unlist(lapply(indexes.long[long.short[[j]]], .subset, k)))) } length.short[j] <- prod(n.indexes.short[[j]]) - if (length(long.short[[j]]) != length.short[j]){ - stop(paste("error in parameter", root.short[[j]], - "in parameters.to.save")) - } +### bug reported by S. McKay Curtis on February 22, 2010, we cannot check that safely: +## if (length(long.short[[j]]) != length.short[j]){ +## stop(paste("error in parameter", root.short[[j]], +## "in parameters.to.save")) +## } indexes.short[[j]] <- as.list(numeric(length.short[j])) for (k in 1:length.short[j]){ indexes.short[[j]][[k]] <- indexes.long[[long.short[[j]][k]]] Modified: trunk/R2WinBUGS/inst/NEWS =================================================================== --- trunk/R2WinBUGS/inst/NEWS 2009-11-08 19:35:59 UTC (rev 133) +++ trunk/R2WinBUGS/inst/NEWS 2010-03-18 16:28:46 UTC (rev 134) @@ -1,13 +1,16 @@ Changes to R2WinBUGS: ===================== +Update 2.1-17 +- fix as.bugs.array as reported by S. McKay Curtis + Update 2.1-16 - fix write.model() again by going throught parse tree now Update 2.1-15 - added seed argument to openbugs() - fix write.model() to work for separatly specified function body -- fix write.model() to make larger numeric (particularly integer) values +- fix write.model() to make larger numeric (particularly integer) values in scientific notation work - fix bugs.update.settings() for R>=2.10.0 compatibility @@ -25,13 +28,13 @@ - bugfix: plot.bugs() did not reset par(mfrow) - bugfix: adaptive phase stuff cannot read from files anymore by openbugs(), feature has been removed -- openbugs now displays messages before starting the sampling +- openbugs now displays messages before starting the sampling (essentially using flush.console()) Update 2.1-11 -- bugfix: if working.directory was unset and files are assumed to be in R's - former wd, these are copied to the tempdir that is set as new working +- bugfix: if working.directory was unset and files are assumed to be in R's + former wd, these are copied to the tempdir that is set as new working directory now. Update 2.1-10 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Gorjanc G. <Gre...@bf...> - 2009-11-10 12:56:45
|
> Confirmed, v 1.0.1 on Mac OS X 10.5.8 running R 2.10.0. Some more > searching suggests winbugs no longer runs properly via wine from about > v 1.1.15 through to v 1.1.32. Can you please share the "error message" when you start WinBUGS via wine? gg |
From: Ian J. <jo...@ma...> - 2009-11-10 12:38:03
|
Confirmed, v 1.0.1 on Mac OS X 10.5.8 running R 2.10.0. Some more searching suggests winbugs no longer runs properly via wine from about v 1.1.15 through to v 1.1.32. Thanks, Ian On 9-Nov-09, at 7:01 PM, Ben Bolker wrote: > Successfully using v 1.0.1 (Ubuntu 8.10) > and/or cxoffice wine v 7.0.0 (same OS) > > Uwe Ligges wrote: >> >> Ian Jonsen wrote: >>> Hi Uwe, >>> >>> I am trying to build an R package that depends on R2WinBUGS and have >>> noticed that winbugs does not run in some of the latest wine >>> versions >>> (at least on an Intel Mac running Leopard). Do you know of the >>> latest >>> wine version that successfully runs winbugs? >> >> >> Ian, >> >> no, CCing the list so that those who no more about the wine part >> can answer. >> >> Best wishes, >> Uwe >> >> >> >>> Thanks, >>> >>> Ian >>> >>> --- >>> >>> Ian Jonsen >>> >>> Adjunct Professor >>> Biology Dept., Dalhousie University >>> jo...@ma... >>> http://www.mathstat.dal.ca/~jonsen/ >>> >>> >>> >>> >> >> ------------------------------------------------------------------------------ >> Let Crystal Reports handle the reporting - Free Crystal Reports >> 2008 30-Day >> trial. Simplify your report design, integration and deployment - >> and focus on >> what you do best, core application coding. Discover what's new with >> Crystal Reports now. http://p.sf.net/sfu/bobj-july >> _______________________________________________ >> Bugs-r-devel mailing list >> Bug...@li... >> https://lists.sourceforge.net/lists/listinfo/bugs-r-devel > > > -- > Ben Bolker > Associate professor, Biology Dep't, Univ. of Florida > bo...@uf... / www.zoology.ufl.edu/bolker > GPG key: www.zoology.ufl.edu/bolker/benbolker-publickey.asc > |
From: Gorjanc G. <Gre...@bf...> - 2009-11-10 05:31:48
|
Ian Jonsen wrote: > Hi Uwe, > > I am trying to build an R package that depends on R2WinBUGS and have > noticed that winbugs does not run in some of the latest wine versions > (at least on an Intel Mac running Leopard). Do you know of the latest > wine version that successfully runs winbugs? Can you give any details? Try to run WinBUGS via wine and let us know what happens. gg |
From: Ben B. <bo...@uf...> - 2009-11-09 23:01:38
|
Successfully using v 1.0.1 (Ubuntu 8.10) and/or cxoffice wine v 7.0.0 (same OS) Uwe Ligges wrote: > > Ian Jonsen wrote: >> Hi Uwe, >> >> I am trying to build an R package that depends on R2WinBUGS and have >> noticed that winbugs does not run in some of the latest wine versions >> (at least on an Intel Mac running Leopard). Do you know of the latest >> wine version that successfully runs winbugs? > > > Ian, > > no, CCing the list so that those who no more about the wine part can answer. > > Best wishes, > Uwe > > > >> Thanks, >> >> Ian >> >> --- >> >> Ian Jonsen >> >> Adjunct Professor >> Biology Dept., Dalhousie University >> jo...@ma... >> http://www.mathstat.dal.ca/~jonsen/ >> >> >> >> > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Bugs-r-devel mailing list > Bug...@li... > https://lists.sourceforge.net/lists/listinfo/bugs-r-devel -- Ben Bolker Associate professor, Biology Dep't, Univ. of Florida bo...@uf... / www.zoology.ufl.edu/bolker GPG key: www.zoology.ufl.edu/bolker/benbolker-publickey.asc |
From: Uwe L. <li...@st...> - 2009-11-09 18:09:21
|
Ian Jonsen wrote: > Hi Uwe, > > I am trying to build an R package that depends on R2WinBUGS and have > noticed that winbugs does not run in some of the latest wine versions > (at least on an Intel Mac running Leopard). Do you know of the latest > wine version that successfully runs winbugs? Ian, no, CCing the list so that those who no more about the wine part can answer. Best wishes, Uwe > Thanks, > > Ian > > --- > > Ian Jonsen > > Adjunct Professor > Biology Dept., Dalhousie University > jo...@ma... > http://www.mathstat.dal.ca/~jonsen/ > > > > |
From: <li...@us...> - 2009-11-08 19:36:05
|
Revision: 133 http://bugs-r.svn.sourceforge.net/bugs-r/?rev=133&view=rev Author: ligges Date: 2009-11-08 19:35:59 +0000 (Sun, 08 Nov 2009) Log Message: ----------- fix buildMCMC() to report right thinning parameters and keep all samples Modified Paths: -------------- trunk/BRugs/NEWS trunk/BRugs/R/buildMCMC.R Modified: trunk/BRugs/NEWS =================================================================== --- trunk/BRugs/NEWS 2009-11-07 19:17:34 UTC (rev 132) +++ trunk/BRugs/NEWS 2009-11-08 19:35:59 UTC (rev 133) @@ -3,6 +3,7 @@ Update 0.5-3 - fix writeModel() again by going through parse tree now +- fix buildMCMC() to report right thinning parameters and keep all samples Update 0.5-2 Modified: trunk/BRugs/R/buildMCMC.R =================================================================== --- trunk/BRugs/R/buildMCMC.R 2009-11-07 19:17:34 UTC (rev 132) +++ trunk/BRugs/R/buildMCMC.R 2009-11-08 19:35:59 UTC (rev 133) @@ -40,10 +40,7 @@ thin <- samplesGetThin() numChains <- samplesGetLastChain() - samplesGetFirstChain() + 1 sampleSize <- sampleSize %/% numChains - beg <- end - (sampleSize - 1) * thin - beg <- beg %/% thin - end <- end %/% thin - + beg <- end - sampleSize * thin + 1 samples <- lapply(mons, subBuildMCMC) samplesChain <- vector(mode="list", length=numChains) @@ -62,7 +59,6 @@ colnames(samplesChain[[i]]) <- mons # } } - mcmcobj <- lapply(samplesChain, mcmc, start = beg, end = end, thin = thin) if(is.R()) class(mcmcobj) <- "mcmc.list" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <li...@us...> - 2009-11-07 19:17:40
|
Revision: 132 http://bugs-r.svn.sourceforge.net/bugs-r/?rev=132&view=rev Author: ligges Date: 2009-11-07 19:17:34 +0000 (Sat, 07 Nov 2009) Log Message: ----------- too tired the other day.... Modified Paths: -------------- trunk/BRugs/R/BRugsFit.R Modified: trunk/BRugs/R/BRugsFit.R =================================================================== --- trunk/BRugs/R/BRugsFit.R 2009-11-07 18:56:39 UTC (rev 131) +++ trunk/BRugs/R/BRugsFit.R 2009-11-07 19:17:34 UTC (rev 132) @@ -15,7 +15,7 @@ on.exit(setwd(savedWD), add = TRUE) } if(is.function(modelFile)){ - writeModel(modelFile, con = (modelFile <- tempfile("model")), digits = 5) + writeModel(modelFile, con = (modelFile <- tempfile("model")), digits = digits) if(!is.R()) on.exit(file.remove(modelFile), add = TRUE) } if(!file.exists(modelFile)) stop(modelFile, " does not exist") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <li...@us...> - 2009-11-07 18:56:50
|
Revision: 131 http://bugs-r.svn.sourceforge.net/bugs-r/?rev=131&view=rev Author: ligges Date: 2009-11-07 18:56:39 +0000 (Sat, 07 Nov 2009) Log Message: ----------- prettify writeModel / write.model output for 0.001 < abs(x) < 10000 Modified Paths: -------------- trunk/BRugs/R/write.model.R trunk/R2WinBUGS/R/write.model.R Modified: trunk/BRugs/R/write.model.R =================================================================== --- trunk/BRugs/R/write.model.R 2009-11-06 19:42:57 UTC (rev 130) +++ trunk/BRugs/R/write.model.R 2009-11-07 18:56:39 UTC (rev 131) @@ -28,7 +28,7 @@ for(i in seq_along(bmodel)){ if(length(bmodel[[i]]) == 1){ if(as.character(bmodel[[i]]) %in% c(":", "[", "[[")) return(bmodel) - if(typeof(bmodel[[i]]) %in% c("double", "integer")){ + if((typeof(bmodel[[i]]) %in% c("double", "integer")) && ((abs(bmodel[[i]]) < 1e-3) || (abs(bmodel[[i]]) > 1e+4))){ counter <- get("rSNRidCounter", envir=env) + 1 assign("rSNRidCounter", counter, envir=env) id <- paste("rSNRid", counter, sep="") Modified: trunk/R2WinBUGS/R/write.model.R =================================================================== --- trunk/R2WinBUGS/R/write.model.R 2009-11-06 19:42:57 UTC (rev 130) +++ trunk/R2WinBUGS/R/write.model.R 2009-11-07 18:56:39 UTC (rev 131) @@ -28,7 +28,7 @@ for(i in seq_along(bmodel)){ if(length(bmodel[[i]]) == 1){ if(as.character(bmodel[[i]]) %in% c(":", "[", "[[")) return(bmodel) - if(typeof(bmodel[[i]]) %in% c("double", "integer")){ + if((typeof(bmodel[[i]]) %in% c("double", "integer")) && ((abs(bmodel[[i]]) < 1e-3) || (abs(bmodel[[i]]) > 1e+4))){ counter <- get("rSNRidCounter", envir=env) + 1 assign("rSNRidCounter", counter, envir=env) id <- paste("rSNRid", counter, sep="") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <li...@us...> - 2009-11-06 19:43:15
|
Revision: 130 http://bugs-r.svn.sourceforge.net/bugs-r/?rev=130&view=rev Author: ligges Date: 2009-11-06 19:42:57 +0000 (Fri, 06 Nov 2009) Log Message: ----------- write.model/writeModel rewritten - almost using its own parser now - hope the last errors have vanished now Modified Paths: -------------- trunk/BRugs/DESCRIPTION trunk/BRugs/NEWS trunk/BRugs/R/BRugsFit.R trunk/BRugs/R/write.model.R trunk/BRugs/man/write.model.Rd trunk/R2WinBUGS/DESCRIPTION trunk/R2WinBUGS/R/bugs.R trunk/R2WinBUGS/R/write.model.R trunk/R2WinBUGS/inst/NEWS trunk/R2WinBUGS/man/write.model.Rd Modified: trunk/BRugs/DESCRIPTION =================================================================== --- trunk/BRugs/DESCRIPTION 2009-11-05 18:48:02 UTC (rev 129) +++ trunk/BRugs/DESCRIPTION 2009-11-06 19:42:57 UTC (rev 130) @@ -1,7 +1,7 @@ Package: BRugs Title: OpenBUGS and its R / S-PLUS interface BRugs -Version: 0.5-2 -Date: 2009-11-04 +Version: 0.5-3 +Date: 2009-11-06 Author: The Chief Software Bug is Andrew Thomas, with web assistance from Real Bug Bob O'Hara. Other members of the BUGS team are statisticians David Spiegelhalter, Nicky Best, Dave Lunn and Ken Rice. Dave Lunn has also made major contributions to the software development. 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 <gre...@bf...>. Description: An R / S-PLUS package containing OpenBUGS and its R / S-PLUS interface BRugs. Maintainer: Uwe Ligges <li...@st...> Modified: trunk/BRugs/NEWS =================================================================== --- trunk/BRugs/NEWS 2009-11-05 18:48:02 UTC (rev 129) +++ trunk/BRugs/NEWS 2009-11-06 19:42:57 UTC (rev 130) @@ -1,6 +1,10 @@ Changes to BRugs: ===================== +Update 0.5-3 +- fix writeModel() again by going through parse tree now + + Update 0.5-2 - added seed argument to BRugsFit() - fix writeModel() to work for separatly specified function body Modified: trunk/BRugs/R/BRugsFit.R =================================================================== --- trunk/BRugs/R/BRugsFit.R 2009-11-05 18:48:02 UTC (rev 129) +++ trunk/BRugs/R/BRugsFit.R 2009-11-06 19:42:57 UTC (rev 130) @@ -15,7 +15,7 @@ on.exit(setwd(savedWD), add = TRUE) } if(is.function(modelFile)){ - writeModel(modelFile, con = (modelFile <- tempfile("model"))) + writeModel(modelFile, con = (modelFile <- tempfile("model")), digits = 5) if(!is.R()) on.exit(file.remove(modelFile), add = TRUE) } if(!file.exists(modelFile)) stop(modelFile, " does not exist") Modified: trunk/BRugs/R/write.model.R =================================================================== --- trunk/BRugs/R/write.model.R 2009-11-05 18:48:02 UTC (rev 129) +++ trunk/BRugs/R/write.model.R 2009-11-06 19:42:57 UTC (rev 130) @@ -1,22 +1,18 @@ -writeModel <- function(model, con = "model.txt") +writeModel <- function(model, con = "model.txt", digits = 5) { if (is.R()){ - #model.text <- attr(model, "source") - #model.text <- sub("^\\s*function\\s*\\(\\s*\\)", "model", model.text) - model.text <- c("model", deparse(body(model))) - model.text <- gsub(" ([[:digit:]\\.]*)e([+-][[:digit:]]{1,3}) ", " \\1E\\2 ", model.text) - model.text <- gsub(" ([[:digit:]]*)(E[+-][[:digit:]]{1,3}) ", " \\1\\.0\\2 ", model.text) + model.text <- c("model", replaceScientificNotationR(body(model), digits = digits)) + # "[\+\-]?\d*\.?[Ee]?[\+\-]?\d*" } else { ## In S-PLUS the source code of a function can be obtained with ## as.character(function_name). This omits the "function_name <- function()" piece - model.text <- as.character(model) - model.text <- paste("model", model.text) + model.text <- paste("model", as.character(model)) } - model.text <- sub("%_%", "", model.text) + model.text <- gsub("%_%", "", model.text) if (!is.R()){ ## In S-PLUS, scientific notation is different than it is in WinBUGS. ## Change the format of any numbers in scientific notation. - model.text <- replaceScientificNotation(model.text) + model.text <- replaceScientificNotationS(model.text) ## remove the "invisible()" line. model.text <- gsub("invisible[ ]*\\([ ]*\\)", "", model.text) @@ -24,7 +20,37 @@ writeLines(model.text, con = con) } -replaceScientificNotation <- function(text){ + +replaceScientificNotationR <- function(bmodel, digits = 5){ + env <- new.env() + assign("rSNRidCounter", 0, envir=env) + replaceID <- function(bmodel, env, digits = 5){ + for(i in seq_along(bmodel)){ + if(length(bmodel[[i]]) == 1){ + if(as.character(bmodel[[i]]) %in% c(":", "[", "[[")) return(bmodel) + if(typeof(bmodel[[i]]) %in% c("double", "integer")){ + counter <- get("rSNRidCounter", envir=env) + 1 + assign("rSNRidCounter", counter, envir=env) + id <- paste("rSNRid", counter, sep="") + assign(id, formatC(bmodel[[i]], digits=digits, format="E"), envir=env) + bmodel[[i]] <- id + } + } else { + bmodel[[i]] <- replaceID(bmodel[[i]], env, digits = digits) + } + } + bmodel + } + bmodel <- deparse(replaceID(bmodel, env, digits = digits), control = NULL) + for(i in ls(env)){ + bmodel <- gsub(paste('"', i, '"', sep=''), get(i, envir=env), bmodel, fixed=TRUE) + } + bmodel +} + + + +replaceScientificNotationS <- function(text){ ## Change the format of any numbers in "text" that are in S-PLUS ## scientific notation to WinBUGS scientific notation Modified: trunk/BRugs/man/write.model.Rd =================================================================== --- trunk/BRugs/man/write.model.Rd 2009-11-05 18:48:02 UTC (rev 129) +++ trunk/BRugs/man/write.model.Rd 2009-11-06 19:42:57 UTC (rev 130) @@ -3,11 +3,13 @@ \title{Creating an OpenBUGS model file} \description{Convert R function to an OpenBUGS model file} \usage{ -writeModel(model, con = "model.txt") +writeModel(model, con = "model.txt", digits = 5) } \arguments{ - \item{model}{R function containg the BUGS model in the BUGS model language, for minor differences see Section Details.} + \item{model}{R function containing the BUGS model in the BUGS model language, for minor differences see Section Details.} \item{con}{passed to \code{link{writeLines}} which actually writes the model file} + \item{digits}{number of significant digits used for \pkg{BUGS} + input, see \code{\link{formatC}}} } \value{ Nothing, but as a side effect, the model file is written. Modified: trunk/R2WinBUGS/DESCRIPTION =================================================================== --- trunk/R2WinBUGS/DESCRIPTION 2009-11-05 18:48:02 UTC (rev 129) +++ trunk/R2WinBUGS/DESCRIPTION 2009-11-06 19:42:57 UTC (rev 130) @@ -1,7 +1,7 @@ Package: R2WinBUGS Title: Running WinBUGS and OpenBUGS from R / S-PLUS -Date: 2009-11-04 -Version: 2.1-15 +Date: 2009-11-06 +Version: 2.1-16 Author: originally written by Andrew Gelman <ge...@st...>; changes and packaged by Sibylle Sturtz <st...@st...> and Uwe Ligges <li...@st...>. Modified: trunk/R2WinBUGS/R/bugs.R =================================================================== --- trunk/R2WinBUGS/R/bugs.R 2009-11-05 18:48:02 UTC (rev 129) +++ trunk/R2WinBUGS/R/bugs.R 2009-11-06 19:42:57 UTC (rev 130) @@ -67,7 +67,7 @@ } else { gsub("\\.tmp$", ".txt", temp) } - write.model(model.file, con=temp) + write.model(model.file, con=temp, digits=digits) model.file <- gsub("\\\\", "/", temp) if(!is.R()) on.exit(file.remove(model.file), add=TRUE) } Modified: trunk/R2WinBUGS/R/write.model.R =================================================================== --- trunk/R2WinBUGS/R/write.model.R 2009-11-05 18:48:02 UTC (rev 129) +++ trunk/R2WinBUGS/R/write.model.R 2009-11-06 19:42:57 UTC (rev 130) @@ -1,22 +1,18 @@ -write.model <- function(model, con = "model.bug") +write.model <- function(model, con = "model.bug", digits = 5) { if (is.R()){ - #model.text <- attr(model, "source") - #model.text <- sub("^\\s*function\\s*\\(\\s*\\)", "model", model.text) - model.text <- c("model", deparse(body(model))) - model.text <- gsub(" ([[:digit:]\\.]*)e([+-][[:digit:]]{1,3}) ", " \\1E\\2 ", model.text) - model.text <- gsub(" ([[:digit:]]*)(E[+-][[:digit:]]{1,3}) ", " \\1\\.0\\2 ", model.text) + model.text <- c("model", replaceScientificNotationR(body(model), digits = digits)) + # "[\+\-]?\d*\.?[Ee]?[\+\-]?\d*" } else { ## In S-PLUS the source code of a function can be obtained with ## as.character(function_name). This omits the "function_name <- function()" piece - model.text <- as.character(model) - model.text <- paste("model", model.text) + model.text <- paste("model", as.character(model)) } model.text <- gsub("%_%", "", model.text) if (!is.R()){ ## In S-PLUS, scientific notation is different than it is in WinBUGS. ## Change the format of any numbers in scientific notation. - model.text <- replaceScientificNotation(model.text) + model.text <- replaceScientificNotationS(model.text) ## remove the "invisible()" line. model.text <- gsub("invisible[ ]*\\([ ]*\\)", "", model.text) @@ -24,7 +20,37 @@ writeLines(model.text, con = con) } -replaceScientificNotation <- function(text){ + +replaceScientificNotationR <- function(bmodel, digits = 5){ + env <- new.env() + assign("rSNRidCounter", 0, envir=env) + replaceID <- function(bmodel, env, digits = 5){ + for(i in seq_along(bmodel)){ + if(length(bmodel[[i]]) == 1){ + if(as.character(bmodel[[i]]) %in% c(":", "[", "[[")) return(bmodel) + if(typeof(bmodel[[i]]) %in% c("double", "integer")){ + counter <- get("rSNRidCounter", envir=env) + 1 + assign("rSNRidCounter", counter, envir=env) + id <- paste("rSNRid", counter, sep="") + assign(id, formatC(bmodel[[i]], digits=digits, format="E"), envir=env) + bmodel[[i]] <- id + } + } else { + bmodel[[i]] <- replaceID(bmodel[[i]], env, digits = digits) + } + } + bmodel + } + bmodel <- deparse(replaceID(bmodel, env, digits = digits), control = NULL) + for(i in ls(env)){ + bmodel <- gsub(paste('"', i, '"', sep=''), get(i, envir=env), bmodel, fixed=TRUE) + } + bmodel +} + + + +replaceScientificNotationS <- function(text){ ## Change the format of any numbers in "text" that are in S-PLUS ## scientific notation to WinBUGS scientific notation Modified: trunk/R2WinBUGS/inst/NEWS =================================================================== --- trunk/R2WinBUGS/inst/NEWS 2009-11-05 18:48:02 UTC (rev 129) +++ trunk/R2WinBUGS/inst/NEWS 2009-11-06 19:42:57 UTC (rev 130) @@ -1,6 +1,9 @@ Changes to R2WinBUGS: ===================== +Update 2.1-16 +- fix write.model() again by going throught parse tree now + Update 2.1-15 - added seed argument to openbugs() - fix write.model() to work for separatly specified function body Modified: trunk/R2WinBUGS/man/write.model.Rd =================================================================== --- trunk/R2WinBUGS/man/write.model.Rd 2009-11-05 18:48:02 UTC (rev 129) +++ trunk/R2WinBUGS/man/write.model.Rd 2009-11-06 19:42:57 UTC (rev 130) @@ -3,7 +3,7 @@ \title{Creating a WinBUGS model file} \description{Convert \R / S-PLUS function to a \pkg{WinBUGS} model file} \usage{ -write.model(model, con = "model.bug") +write.model(model, con = "model.bug", digits = 5) } \arguments{ @@ -11,13 +11,15 @@ model language, for minor differences see Section Details.} \item{con}{passed to \code{\link{writeLines}} which actually writes the model file} + \item{digits}{number of significant digits used for \pkg{WinBUGS} + input, see \code{\link{formatC}}} } \value{Nothing, but as a side effect, the model file is written} \details{ -BUGS models follow closely S syntax. It is teherfore possible to write +BUGS models follow closely S syntax. It is therefore possible to write most BUGS models as \R functions. As a difference, BUGS syntax allows truncation specification like this: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <li...@us...> - 2009-11-05 18:48:11
|
Revision: 129 http://bugs-r.svn.sourceforge.net/bugs-r/?rev=129&view=rev Author: ligges Date: 2009-11-05 18:48:02 +0000 (Thu, 05 Nov 2009) Log Message: ----------- - fix write.model() / writeModel() to make larger numeric (particularly integer) values in scientific notation work Modified Paths: -------------- trunk/BRugs/NEWS trunk/BRugs/R/write.model.R trunk/R2WinBUGS/R/write.model.R trunk/R2WinBUGS/inst/NEWS Modified: trunk/BRugs/NEWS =================================================================== --- trunk/BRugs/NEWS 2009-11-05 16:55:57 UTC (rev 128) +++ trunk/BRugs/NEWS 2009-11-05 18:48:02 UTC (rev 129) @@ -3,4 +3,6 @@ Update 0.5-2 - added seed argument to BRugsFit() -- fix writeModel() to work for separatly specified function body \ No newline at end of file +- fix writeModel() to work for separatly specified function body +- fix writeModel() to make larger numeric (particularly integer) values + in scientific notation work Modified: trunk/BRugs/R/write.model.R =================================================================== --- trunk/BRugs/R/write.model.R 2009-11-05 16:55:57 UTC (rev 128) +++ trunk/BRugs/R/write.model.R 2009-11-05 18:48:02 UTC (rev 129) @@ -4,6 +4,8 @@ #model.text <- attr(model, "source") #model.text <- sub("^\\s*function\\s*\\(\\s*\\)", "model", model.text) model.text <- c("model", deparse(body(model))) + model.text <- gsub(" ([[:digit:]\\.]*)e([+-][[:digit:]]{1,3}) ", " \\1E\\2 ", model.text) + model.text <- gsub(" ([[:digit:]]*)(E[+-][[:digit:]]{1,3}) ", " \\1\\.0\\2 ", model.text) } else { ## In S-PLUS the source code of a function can be obtained with ## as.character(function_name). This omits the "function_name <- function()" piece Modified: trunk/R2WinBUGS/R/write.model.R =================================================================== --- trunk/R2WinBUGS/R/write.model.R 2009-11-05 16:55:57 UTC (rev 128) +++ trunk/R2WinBUGS/R/write.model.R 2009-11-05 18:48:02 UTC (rev 129) @@ -4,6 +4,8 @@ #model.text <- attr(model, "source") #model.text <- sub("^\\s*function\\s*\\(\\s*\\)", "model", model.text) model.text <- c("model", deparse(body(model))) + model.text <- gsub(" ([[:digit:]\\.]*)e([+-][[:digit:]]{1,3}) ", " \\1E\\2 ", model.text) + model.text <- gsub(" ([[:digit:]]*)(E[+-][[:digit:]]{1,3}) ", " \\1\\.0\\2 ", model.text) } else { ## In S-PLUS the source code of a function can be obtained with ## as.character(function_name). This omits the "function_name <- function()" piece Modified: trunk/R2WinBUGS/inst/NEWS =================================================================== --- trunk/R2WinBUGS/inst/NEWS 2009-11-05 16:55:57 UTC (rev 128) +++ trunk/R2WinBUGS/inst/NEWS 2009-11-05 18:48:02 UTC (rev 129) @@ -4,6 +4,8 @@ Update 2.1-15 - added seed argument to openbugs() - fix write.model() to work for separatly specified function body +- fix write.model() to make larger numeric (particularly integer) values + in scientific notation work - fix bugs.update.settings() for R>=2.10.0 compatibility Update 2.1-14 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <li...@us...> - 2009-11-05 16:56:16
|
Revision: 128 http://bugs-r.svn.sourceforge.net/bugs-r/?rev=128&view=rev Author: ligges Date: 2009-11-05 16:55:57 +0000 (Thu, 05 Nov 2009) Log Message: ----------- fix the last fix Modified Paths: -------------- trunk/R2WinBUGS/R/bugs.update.settings.R Modified: trunk/R2WinBUGS/R/bugs.update.settings.R =================================================================== --- trunk/R2WinBUGS/R/bugs.update.settings.R 2009-11-05 16:01:06 UTC (rev 127) +++ trunk/R2WinBUGS/R/bugs.update.settings.R 2009-11-05 16:55:57 UTC (rev 128) @@ -44,7 +44,7 @@ } Sys.setlocale("LC_CTYPE", locale) .writeBin(registry, - file.path(bugs.directory, "System/Rsrc/Registry.odc"), endian="little", useBytes = TRUE) + file.path(bugs.directory, "System/Rsrc/Registry.odc"), endian="little") } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <li...@us...> - 2009-11-05 16:01:16
|
Revision: 127 http://bugs-r.svn.sourceforge.net/bugs-r/?rev=127&view=rev Author: ligges Date: 2009-11-05 16:01:06 +0000 (Thu, 05 Nov 2009) Log Message: ----------- fix for encoding issues for R >= 2.10.0 Modified Paths: -------------- trunk/R2WinBUGS/R/bugs.update.settings.R trunk/R2WinBUGS/inst/NEWS Modified: trunk/R2WinBUGS/R/bugs.update.settings.R =================================================================== --- trunk/R2WinBUGS/R/bugs.update.settings.R 2009-11-05 16:00:32 UTC (rev 126) +++ trunk/R2WinBUGS/R/bugs.update.settings.R 2009-11-05 16:01:06 UTC (rev 127) @@ -1,58 +1,60 @@ "bugs.update.settings" <- function (n.burnin, bugs.directory) { - char.burnin <- as.character(n.burnin - 1) if(is.R()) { .fileCopy <- file.copy + .regexpr <- function(...) regexpr(..., useBytes = TRUE) + .sub <- function(...) sub(..., useBytes = TRUE) + .writeBin <- + if(getRversion() >= "2.10") + function(...) writeBin(..., useBytes = TRUE) + else + writeBin } else { .fileCopy <- splus.file.copy + .regexpr <- regexpr + .sub <- sub + .writeBin <- writeBin } - .fileCopy(file.path(bugs.directory, "System/Rsrc/Registry.odc"), - file.path(bugs.directory, "System/Rsrc/Registry_Rsave.odc"), - overwrite=TRUE) + + + char.burnin <- as.character(n.burnin - 1) registry <- readBin(file.path(bugs.directory, "System/Rsrc/Registry.odc"), "character", 400, size=1, endian="little") locale <- Sys.getlocale("LC_CTYPE") Sys.setlocale("LC_CTYPE", "C") - if(is.R()) { - info <- registry[regexpr("Int", registry, fixed=TRUE, useBytes=TRUE) > 0] - } else { - info <- registry[regexpr("Int", registry, fixed=TRUE) > 0] - } - while(regexpr("\r", info) > 0) { - newline <- regexpr("\r", info) + .fileCopy(file.path(bugs.directory, "System/Rsrc/Registry.odc"), + file.path(bugs.directory, "System/Rsrc/Registry_Rsave.odc"), + overwrite = TRUE) + info <- registry[.regexpr("Int", registry, fixed = TRUE) > 0] + while(.regexpr("\r", info) > 0) { + newline <- .regexpr("\r", info) info <- substring(info, newline + 1) - line <- substring(info, 1, regexpr("\r", info) - 1) - if(regexpr("AdaptivePhase", line) > 0) { - if(is.R()) { - numpos <- regexpr("Int", line, fixed=TRUE, useBytes=TRUE) + 4 - } else { - numpos <- regexpr("Int", line, fixed=TRUE) + 4 - } + line <- substring(info, 1, .regexpr("\r", info) - 1) + if(.regexpr("AdaptivePhase", line) > 0) { + numpos <- .regexpr("Int", line, fixed=TRUE) + 4 num <- substring(line, numpos) if(as.numeric(num) > n.burnin) { blanks <- rep(" ", nchar(num, type="chars") - nchar(char.burnin, type="chars")) num.new <- paste(paste(blanks, collapse=""), char.burnin, sep="") - line.new <- sub(num, num.new, line) - registry <- sub(line, line.new, registry) + line.new <- .sub(num, num.new, line) + registry <- .sub(line, line.new, registry) } } } Sys.setlocale("LC_CTYPE", locale) - writeBin(registry, - file.path(bugs.directory, "System/Rsrc/Registry.odc"), endian="little") + .writeBin(registry, + file.path(bugs.directory, "System/Rsrc/Registry.odc"), endian="little", useBytes = TRUE) } -## TODO: why is not this function called just file.copy within !is.R() -"splus.file.copy"<- - function(from, to, overwrite=FALSE) +splus.file.copy <- function(from, to, overwrite=FALSE) { - if(!file.exists(from)) - stop("File: ", from, " does not exist") - if(!overwrite && file.exists(to)) - stop("File: ", to, " already exists and overwrite is FALSE") - n <- file.info(from)$size - z <- writeBin(readBin(from, what="integer", size=1, n=n), to, size=1) - invisible(z) + if(!file.exists(from)) + stop("File: ", from, " does not exist") + if(!overwrite && file.exists(to)) + stop("File: ", to, " already exists and overwrite is FALSE") + n <- file.info(from)$size + z <- writeBin(readBin(from, what="integer", size=1, n=n), to, size=1) + invisible(z) } Modified: trunk/R2WinBUGS/inst/NEWS =================================================================== --- trunk/R2WinBUGS/inst/NEWS 2009-11-05 16:00:32 UTC (rev 126) +++ trunk/R2WinBUGS/inst/NEWS 2009-11-05 16:01:06 UTC (rev 127) @@ -4,6 +4,7 @@ Update 2.1-15 - added seed argument to openbugs() - fix write.model() to work for separatly specified function body +- fix bugs.update.settings() for R>=2.10.0 compatibility Update 2.1-14 - new argument over.relax=FALSE This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <li...@us...> - 2009-11-05 16:00:38
|
Revision: 126 http://bugs-r.svn.sourceforge.net/bugs-r/?rev=126&view=rev Author: ligges Date: 2009-11-05 16:00:32 +0000 (Thu, 05 Nov 2009) Log Message: ----------- add news entry for last bugfix Modified Paths: -------------- trunk/R2WinBUGS/inst/NEWS Modified: trunk/R2WinBUGS/inst/NEWS =================================================================== --- trunk/R2WinBUGS/inst/NEWS 2009-11-05 15:59:59 UTC (rev 125) +++ trunk/R2WinBUGS/inst/NEWS 2009-11-05 16:00:32 UTC (rev 126) @@ -3,6 +3,7 @@ Update 2.1-15 - added seed argument to openbugs() +- fix write.model() to work for separatly specified function body Update 2.1-14 - new argument over.relax=FALSE This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <li...@us...> - 2009-11-05 16:00:23
|
Revision: 125 http://bugs-r.svn.sourceforge.net/bugs-r/?rev=125&view=rev Author: ligges Date: 2009-11-05 15:59:59 +0000 (Thu, 05 Nov 2009) Log Message: ----------- add news entry for last bugfix Modified Paths: -------------- trunk/BRugs/NEWS Modified: trunk/BRugs/NEWS =================================================================== --- trunk/BRugs/NEWS 2009-11-04 18:56:49 UTC (rev 124) +++ trunk/BRugs/NEWS 2009-11-05 15:59:59 UTC (rev 125) @@ -2,4 +2,5 @@ ===================== Update 0.5-2 -- added seed argument to BRugsFit() \ No newline at end of file +- added seed argument to BRugsFit() +- fix writeModel() to work for separatly specified function body \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <li...@us...> - 2009-11-04 18:56:56
|
Revision: 124 http://bugs-r.svn.sourceforge.net/bugs-r/?rev=124&view=rev Author: ligges Date: 2009-11-04 18:56:49 +0000 (Wed, 04 Nov 2009) Log Message: ----------- fix for model file path locations with backslash Modified Paths: -------------- trunk/R2WinBUGS/R/bugs.script.R Modified: trunk/R2WinBUGS/R/bugs.script.R =================================================================== --- trunk/R2WinBUGS/R/bugs.script.R 2009-11-04 17:10:23 UTC (rev 123) +++ trunk/R2WinBUGS/R/bugs.script.R 2009-11-04 18:56:49 UTC (rev 124) @@ -14,7 +14,7 @@ model <- if (length(grep("\\\\", model.file)) || length(grep("/", model.file))) { - model.file + gsub("\\\\", "/", model.file) } else file.path(working.directory, model.file) model <- native2win(model, useWINE=useWINE, newWINE=newWINE, WINEPATH=WINEPATH) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |