R/reserved.R

jags_distributions <- function () {
  sort(c(
    "dbeta",
    "dchisqr",
    "ddexp",
    "dexp",
    "df",
    "dgamma",
    "dgen.gamma",
    "dlogis",
    "dlnorm",
    "dnchisqr",
    "dnorm",
    "dpar",
    "dt",
    "dunif",
    "dweib",
    "dbetabin",
    "dbern",
    "dbin",
    "dcat",
    "dhyper",
    "dnegbin",
    "dpois",
    "ddirch",
    "dmnorm",
    "dwish",
    "dmt",
    "dmulti"))
}

jags_functions <- function () {
  
  dists <- c("bern",
    "beta",
    "bin",
    "chisqr",
    "dexp",
    "exp",
    "f",
    "gamma",
    "gen.gamma",
    "hyper",
    "logis",
    "lnorm",
    "negbin",
    "nchisqr",
    "norm",
    "par",
    "pois",
    "t",
    "weib")
  
  sort(c(
    "abs",
    "arccos",
    "arccosh",
    "arcsin",
    "arcsinh",
    "arctan",
    "arctanh",
    "cos",
    "cosh",
    "cloglog",
    "equals",
    "exp",
    "icloglog",
    "ifelse",
    "ilogit",
    "log",
    "logfact",
    "loggam",
    "logit",
    "phi",
    "pow",
    "probit",
    "round",
    "sin",
    "sinh",
    "sqrt",
    "step",
    "tan",
    "tanh",
    "trunc",
    "inprod",
    "interp.lin",
    "logdet",
    "max",
    "mean",
    "min",
    "prod",
    "sum",
    "sd",
    "inverse",
    "rank",
    "sort",
    "t",
    "acos",
    "acosh",
    "asin",
    "asinh",
    "atan",
    paste0("d", dists),
    paste0("p", dists),
    paste0("q", dists),
    "length",
    "dim",
    "for",
    "T", 
    "in"))
}

jags_reserved_words <- function () {
  sort(c(jags_distributions(), jags_functions()))
}
poissonconsulting/jaggernaut documentation built on Feb. 18, 2021, 11:10 p.m.