getBugsExample {rube}R Documentation

Read WinBUGS example files.

Description

This hack reads the .odc (Blackbox's Oberon DoCument format) files supplied as WinBUGS examples. The model(s) are all converted to text, and the data and init(s) are read. Most importantly, matrices and arrays are converted from the C style (e.g., matrices are by row) used in the odc files to the Fortran style (e.g., matrices are by column) used by R.

Usage

getBugsExample(ename, repair=NULL, bugs.directory=ifelse(Sys.getenv("BUGSDIR")=="", 
                     "c:/Program Files/WinBUGS14/Examples",
                     paste(Sys.getenv("BUGSDIR"),"/Examples",sep="")))

Arguments

ename

The name of an example. If ".odc" is not included and ename.odc is not found, the first example with 'ename' in its file name is used (with a warning).

repair

A vector or matrix of triples used to repair errors in the WinBUGS example files. The errors are run-on errors, i.e, newlines between model lines are missing. The triples are model number, line number, last character position of the first statement in the run-on statement line.

bugs.directory

The location of the bugs examples. If the system environmental variable 'BUGSDIR' is defined, this overrides the value.

Details

This is designed for testing WinBUGS examples.

Value

Returns a list with numbered modelX, dataX, and initsX components.

Author(s)

Howard J. Seltman <hseltman@stat.cmu.edu>

References

http://www.stat.cmu.edu/~hseltman/rube/

See Also

rube


[Package rube version 0.3-11 Index]