Learn R Programming

bayescount (version 0.8.2)

dump.format: PRODUCE A CHARACTER STRING IN THE R DUMP FORMAT TO BE USED WITH JAGS

Description

Function used by bayescount.single() and run.model() to convert a numeric vector of data or initial values to a character string in the correct format to be read by JAGS as either data or initial values, using the jags.model function.

Usage

dump.format(variable, value)

Arguments

Value

A charcter string in the R dump format.

See Also

bayescount.single run.jags

Examples

Run this code
initial.values.1 <- dump.format(list("mean", "sd", "lambda"), list("1", "0.1", c(4,2,7,0,6,9,1,4,12,1)))
initial.values.2 <- dump.format(list("mean", "sd", "lambda"), list("10", "10", c(4,2,7,0,6,9,1,4,12,1)))
data <- dump.format(list("N", "Count"), list("10", c(4,2,7,0,6,9,1,4,12,1)))

Run the code above in your browser using DataLab