bugsData {BRugs}R Documentation

Writing input for OpenBUGS

Description

Write data file for OpenBUGS.

Usage

bugsData(data, fileName = file.path(getwd(), "data.txt"), digits = 5)

Arguments

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

Value

Invisibly returns the fileName.

Note

bugsData uses format="E" internally, i.e. you need to pay attention when writing integers containg many significant digits to the data file.

See Also

BRugs


[Package BRugs version 0.4-1 Index]