runGUI: Run rodeo-based model in shiny GUI

Description Usage Arguments Value Author(s) Examples

Description

Runs a rodeo-based model in a shiny GUI to allow for variation of parameters and/or initial values.

Usage

1
2
3
4
5
runGUI(dir = ".", xlFile = "model.xlsx", funsR = "functions.r",
  funsF = list.files(path = dir, pattern = ".+[.]f95$"), tables = c(vars =
  "vars", pars = "pars", funs = "funs", pros = "pros", stoi = "stoi"),
  colsep = ",", stoiAsMatrix = FALSE, obs = NULL, dllname = NULL,
  serverMode = FALSE)

Arguments

dir

Directory where input files are located. This is assumed to apply to any input files (i.e. xlFile, funsR, funsF, and possibly the values of tables).

xlFile

Either the base name of file in MS Excel format holding the model definition or NULL. In the latter case, the model definition is read from delimited text files using read.table(header=TRUE, sep=colsep) where the last argument is under user control (see colsep below).

funsR

Base name of file with function definitions in R.

funsF

Base name of file with function definitions in Fortran 95.

tables

Named vector with required elements 'vars', 'pars', 'funs', 'pros', and 'stoi'. If a file name was supplied in xlFile, the values are interpreted as the names of worksheets holding the declaration of variables, parameters, functions, process rates, and stoichiometry factors, respectively. If xlFile is an empty string, the values are interpreted as the names of delimited text files holding the respective information.

colsep

Specifies the column separator in text files. Only used if xlFile is NULL.

stoiAsMatrix

Logical. Allows the stoichiometry matrix to be supplied as a 3-column table or as a matrix.

obs

If not NULL, this must be a data frame with observed values of the state variables. Time information (numeric) is expected in the first column. Columns with observation data (if existing) must be named like the simulated state variables. Missing values must be marked as NA.

dllname

Character string used as the name for the built library. This is the base name without file extension (must not contain path separators, white space, etc.). If set to NULL (the default), an automatic name is assigned. The library is created in the folder returned by tempdir() and it carries the system-specific extension for shared libraries according to .Platform$dynlib.ext.

serverMode

Defaults to FALSE. If set to TRUE, data required by the GUI are saved to disk but the shiny app is not run.

Value

If serverMode is FALSE, the function returns NULL. Otherwise it returns a vector holding the names of 3 files needed to run the GUI.

Author(s)

David Kneis david.kneis@tu-dresden.de

Examples

1
2
3
4
5
## Not run: 
  library(rodeoApp)
  runGUI(dir=system.file("examples/DRT", package="rodeoApp"))

## End(Not run)

dkneis/rodeoApp documentation built on May 15, 2019, 9:12 a.m.