R/writeJagsFile.R

Defines functions `writeJagsFile`

`writeJagsFile` <-
function(model, priors, stem="test")
{

  if (class(model) != "modelSegratioMM")
    stop("model must be of class 'modelSegratioMM'")

  if (class(priors) != "priorsSegratioMM")
    stop("model must be of class 'priorsSegratioMM'")
  
  bc <- gsub("STEM",stem,model$bugs.code)
  bc[2] <- paste(bc[2],date())
  cat(file=paste(stem,".bug",sep=""),
      gsub("UNSPECIFIED", priors$type, bc), priors$bugs.code, sep="\n")
}

Try the polySegratioMM package in your browser

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

polySegratioMM documentation built on May 2, 2019, 9:49 a.m.