From ligges at statistik.uni-dortmund.de  Wed Aug 15 10:37:19 2007
From: ligges at statistik.uni-dortmund.de (Uwe Ligges)
Date: Wed, 15 Aug 2007 10:37:19 +0200
Subject: [Rd] Sligthly OT Re: Makefile for embedding OpenBUGS in R
	package
In-Reply-To: <46C2094F.5000102@telenet.be>
References: <W906017980119021186410641@nocme1bl6.telenet-ops.be>	<Pine.LNX.4.64.0708062029410.27542@gannet.stats.ox.ac.uk>	<46B7B87C.1070808@cimr.cam.ac.uk>	<Pine.LNX.4.64.0708070340290.31210@gannet.stats.ox.ac.uk>	<46B8D6AD.9040707@cimr.cam.ac.uk>	<46B96EE6.2090606@statistik.uni-dortmund.de>	<46BA1863.6030609@telenet.be>
	<46BA2E65.7080301@cimr.cam.ac.uk>	<46C14875.5020008@businessdecision.com>
	<loom.20070814T203929-398@post.gmane.org>
	<46C2094F.5000102@telenet.be>
Message-ID: <46C2BB3F.5010103@statistik.uni-dortmund.de>



Tobias Verbeke wrote:
> Hi Ben,
> 
>> Tobias Verbeke <tobias.verbeke <at> businessdecision.com> writes:
>>
>>> The resulting package now allows for using an embedded OpenBUGS
>>> on GNU/Linux without relying on WINE. Thanks to all for their helpful 
>>> comments.
>>
>>   woo-hoo!  this is great!  Any chance that this will propagate
>> to the R2WinBUGS package at some point ... ??? 
> 
> A quick look at R2WinBUGS reveals that this package does not
> embed the OpenBUGS distribution within the package. This is
> not needed per se, but will then imply that the user has to
> compile the C file that accesses the brugs.so shared library
> (or a variant as the path to the bugs executable is an argument
> to the bugs function in R2WinBUGS). When I worked on this (for
> a specific application a client had in mind), I deliberately
> chose to avoid any administration in addition to ordinary R
> package installation.
> 
> The BRugs package, on the contrary, embeds a (previous) version
> of OpenBUGS and could use what we found out in this thread, but
> then the interface of BRugs is more designed for interactive use
> of BUGS which currently still is possible only on Windows. It
> might be an idea to modify the BRugsFit function (BRugs' meta function) 
> to run a script file in one go when it runs on GNU/Linux. This
> modification is needed as the current BRugsfit uses the "interactive"
> commands modelCheck(), modelCompile() etc. in separate steps.
> 
> If the maintainer (in cc) would think this is a good idea, the
> following things should then be assured within the BRugs package
> in addition of changing BRugsFit function for it to work under
> Linux:
> 
> (1) all of the BUGS files (data, model, inits and script files)
>     should have CR LF line endings
> 
> (2) the script file produced should end on modelQuit() without
>     any additional character (no newline)
> 
> Alternatively, it could be put into (yet another) R <-> BUGS
> package, but this would duplicate a lot of the BRugs code.


I'm fine with it, but I'd prefer to have such wrappers in R2WinBUGS 
(which already includes all those ugly wrappers).
BRugs was intended to have a more or less clean interface and I'd like 
to see a working .so that would be available at some point for running 
under Linux. So if anybody has the knowledge and tools to help Andrew 
Thomas, please do.

Additions to R2WinBUGS and BRugs are welcome. Please send patches 
against the sources on sourceforge 
(http://sourceforge.net/projects/bugs-r), since considerable changes 
have been made in the current developer version: e.g. integration of 
OpenBUGS 3.0.1 (thanks to Insightful), ports to S-PLUS (thanks to 
Insightful). Please make sure any changes will not break behaviour under 
S-PLUS.

Thanks you very much for contributing to BRugs!


Best,
Uwe



> Kind regards,
> Tobias
>



[Rd] Sligthly OT Re: Makefile for embedding OpenBUGS in R package
Uwe Ligges