getBugsExample {rube} | R Documentation |
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.
getBugsExample(ename, repair=NULL, bugs.directory=ifelse(Sys.getenv("BUGSDIR")=="", "c:/Program Files/WinBUGS14/Examples", paste(Sys.getenv("BUGSDIR"),"/Examples",sep="")))
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. |
This is designed for testing WinBUGS examples.
Returns a list with numbered modelX, dataX, and initsX components.
Howard J. Seltman <hseltman@stat.cmu.edu>
http://www.stat.cmu.edu/~hseltman/rube/