R/model.save.state.R

"modelSaveState" <- function(stem)
{
## Saves the sate of each chain in OpenBUGS model
    if(!is.character(stem) || length(stem)!=1)
        stop("'stem' must be character of length 1")
    if(dirname(stem) == ".") 
        stem <- file.path(getwd(), basename(stem))
    command <- paste("BugsEmbed.UpdateGuard", ";BugsEmbed.WriteChains(", sQuote(stem), ")")
    .CmdInterpreter(command)
    if(getOption("BRugsVerbose")) 
      buffer()
}

Try the BRugs package in your browser

Any scripts or data that you put into this service are public.

BRugs documentation built on May 31, 2023, 7:19 p.m.