model.character {rube} | R Documentation |
Show the code for a text model or file containing the model as text. This show a nicely formatted version of the model code, optionally substituting subs, cases, and varLists.
## S3 method for class 'character' model(x, ..., indent=" ", lineNumbers=TRUE)
x |
rube code as text or filename of a text file with rube code |
... |
optional arguments passed to showModel |
indent |
the string used for indenting ("\\t" is OK) |
lineNumbers |
a logical value indicating lineNumbers should be shown |
Displays the model code with indenting. Optional arguments include 'subs' (a named list of the form WHAT=value that defines overrides for any default values; 'cases' (a string vector of values used to define IFCASE); and 'varList' (a named list of string vectors in the form of model formulas).
Returns NULL invisibly.
Howard J. Seltman <hseltman@stat.cmu.edu>
m = "model { for (i in 1:5) { x[i]~dnorm(mu,1) } mu~dnorm(0,MU.PREC=0.01) }" model(m, subs=list(MU.PREC=0.001))