bugsData {BRugs} | R Documentation |
Write data file for OpenBUGS.
bugsData(data, fileName = file.path(getwd(), "data.txt"), digits = 5)
data |
either a named list (names corresponding to variable names in the model file) of the data for the OpenBUGS model, or a vector or list of the names of the data objects used by the model |
fileName |
the filename, defaults to ‘data.txt’ in the current working directory |
digits |
number of significant digits used for OpenBUGS input, see formatC |
Invisibly returns the fileName
.
bugsData
uses format="E"
internally, i.e. you need to
pay attention when writing integers containg many significant digits to the data file.