Learn R Programming

rbugs (version 0.5-9.1)

genDataFile: Generating the Data File for BUGS

Description

Generating the data file which can be used in the script file for runing BUGS batch-mode.

Usage

genDataFile(dataList, dataFile)

Arguments

dataList

A list of data that are needed by BUGS. Its elements must be numeric vector or matrices.

dataFile

A character string naming the file to print to. It must end with .txt to be recoganizable by BUGS.

Value

None.

See Also

genInitsFile, genBugsScript, format4Bugs

Examples

Run this code
# NOT RUN {
dat <- list(a = runif(1), b=rnorm(2), c=matrix(rexp(4), 2, 2))
genDataFile(dat, "foo.txt")
file.show("foo.txt")
unlink("foo.txt")
# }

Run the code above in your browser using DataLab