This function converts a R function with JAGS model into a text and then
writes it into a given file. During the "model into text" conversion, the
format of numbers of which absolute value is less than 0.001 or greater
than 10000 is changed. These numbers will be converted into scientific
format with specified number of significant digits using formatC()
function.
(string or NULL) the name of the file (including the
optional path) where the model will be saved. If NULL, the file will be
created in a R_crmPack folder placed under temporary directory indicated
by tempdir() function.
digits
(count) a desired number of significant digits for
for numbers used in JAGS input, see formatC().