'wb2ob.mod' converts a WinBUGS model file to an OpenBUGS model file.
99% of the code for 'wb2ob.mod' was copied verbatim from the
'Win2OpenBUGS' which was downloaded from
'http://www.openbugs.info/w/UserContributedCode'
'wb2ob.mod' differs from 'Win2OpenBUGS' in three ways.
First, by default,
'wb2ob.mod' adds a header to the resulting OpenBUGS model file.
The header indicates the name of the WinBUGS model file from which it is
derived.  The user can also specify a character vector by means
of the 'header' argument which will be used in place of the default
header.  Second, by default, wb2ob.mod adds ".ob" before the
extension of the output file name.  This can be avoided by specifying
an output file name.
Third, 'wb2ob.mod' corrects several errors in the 'Win2OpenBUGS' code.
'Win2OpenBUGS' had the 'else' misplaced in several 'if ... then ... else'
constructions.  These have been corrected.  In addition, 'Win2OpenBUGS'
mistakenly converts a * that stands for multiplication into a quoted *,
e.g., 'var1 * var2' is converted to 'var2 "*" var2'.  To avoid this,
the code that performs this conversion has been commented out.  Note
that this change disables the conversion of node wildcards.  If node
wildcards are present in the to-be-converted WinBUGS model file, then
the resulting OpenBUGS model file will need to be edited by hand to
place these wildcards in double quoted.
Regarding the 'Win2OpenBUGS' function, the following attribution was
copied from the website at the preceding url:
"Larry Gould (Merck) has created an R function to convert WinBUGS script
files to OpenBUGS script files. Chris Jackson (mrc-bsu.cam.ac.uk)has
revised the code to fix some errors."
ARGUMENTS
WinBugsScriptFile = name of WinBUGS model file; include path if necessary
OpenBugsScriptFile = "default" - the default creates an OpenBUGS
model file whose name adds '.ob' to the name of the WinBUGS model file,
e.g., 'model.1.txt' is converted to 'model.1.ob.txt'.  If 'OpenBugsScriptFile'
is set to any other value, this becomes the name of the OpenBUGS model file.
header = "default" places a header at the start of the OpenBUGS model
file that names the WinBUGS model file from which it was derived.  The user
can specify any other 'header' argument to be used as a header for the
OpenBUGS model file.
if header2 is a non-empty character vector, then it is concatenated to
the end of the header string after the default header has been created.
If header2 = "" (default), then header2 has no effect on the header.
If 'silently = TRUE', then the OpenBUGS model file is not copied to the
screen; if 'silently = FALSE' (default), then it is.