Constructor for S3 class fruits
fruits.Rd
All arguments are checked for correct class, length, names etc. Constants and model code are added automatically.
Arguments
- data
list: input data
- modelOptions
list: contains elements
burnin
anditerations
- valueNames
list: contains names for the
targets
,fractions
, andsources
- priors
list of characters with prior expressions
- userEstimates
list of characters
Examples
if (FALSE) {
# 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"))
}