This function sets a trace monitor for all requested nodes, updates the model and coerces the output to a single mcmc.list object. This function uses coda.samples but keeps track of data cloning information supplied via the model argument.
variable.names: a character vector giving the names of variables to be monitored
n.iter: number of iterations to monitor
thin: thinning interval for monitors
na.rm: logical flag that indicates whether variables containing missing values should be omitted. See details in help page of coda.samples.
...: optional arguments that are passed to the update method for jags model objects
Returns
An mcmc.list object. An n.clones attribute is attached to the object, but unlike in jags.fit there is no updated.model attribute as it is equivalent to the input jags model object.