fruits: Constructor for S3 class 'fruits'

View source: R/04-fruitsClass.R

fruitsR Documentation

Constructor for S3 class fruits

Description

All arguments are checked for correct class, length, names etc. Constants and model code are added automatically.

Usage

fruits(
  data,
  modelOptions,
  valueNames,
  priors = list(),
  userEstimates = list(list(), list())
)

Arguments

data

list: input data

modelOptions

list: contains elements burnin and iterations

valueNames

list: contains names for the targets, fractions, and sources

priors

list of characters with prior expressions

userEstimates

list of characters

Examples

## Not run: 
# load fruits data:
load(system.file("app/exampleModels/", "fruitsExample.Rdata", package = "ReSources"))
# get Fruits-Object
fruitsObj <- fruits(data, modelOptions, valueNames, priors, userEstimates)
# run model
model <- compileRunModel(fruitsObj)
modelResults <- getResultStatistics(model$parameters, model$userEstimateSamples, fruitsObj,
  DT = FALSE, agg = FALSE
)

# better: use shiny app:
shiny::runApp(paste0(system.file(package = "ReSources"), "/app"))

## End(Not run)

Pandora-IsoMemo/resources documentation built on Nov. 21, 2024, 3:56 a.m.