ezParam: Build parameter object

View source: R/00defaults.R

ezParamR Documentation

Build parameter object

Description

Parameters can be specified in the global defaults, app-specific defaults and user-given. If a parameter is specified in multiple places, the user parameters override the app defaults which again override the global defaults

Usage

ezParam(
  userParam = list(),
  globalDefaults = getGlobalDefaults(),
  appDefaults = ezFrame()
)

parseOptions(optString)

Arguments

userParam

a list of parameters defined by the user

globalDefaults

a data.frame containing the global defaults for parameters. Includes for each parameter a name, a default value, the type, and a description. The global defaults are read from a file. See the file EZ_PARAM_DEFAULTS.txt in the package directory.

appDefaults

a data.frame containing application specific defaults. Must have the same columns as the globalDefaults data.frame.

Value

Returns the merged list of parameters

Functions

  • parseOptions: Used to parse additional options specified in userParam$specialOptions. Converts an option specification in the from "key1=value1 key2=value2" into a named list

Author(s)

Rehrauer, Hubert

Schmid, Peter

Examples

library(ezRun)
head(EZ_PARAM_DEFAULTS)
globalDefaultTypedParams = ezParam()
modifiedParams = ezParam(list(ram=40))
modifiedParams$ram
globalDefaultTypedParams$ram
parseOptions("a=5 b='foo with space' c=foo")

uzh/ezRun documentation built on May 9, 2024, 6:16 p.m.