Learn R Programming

mrgsolve (version 0.8.12)

param: Create and work with parameter objects

Description

See numericlist for methods to deal with parameter_list objects.

Usage

param(.x, ...)

# S4 method for mrgmod param(.x, .y = list(), ..., .pat = "*", .strict = FALSE)

# S4 method for mrgsims param(.x, ...)

# S4 method for missing param(..., .strict = TRUE)

# S4 method for list param(.x, ...)

# S4 method for ANY param(.x, ...)

# S4 method for parameter_list show(object)

allparam(.x)

as.param(.x, ...)

# S4 method for list as.param(.x, ...)

# S4 method for numeric as.param(.x, ...)

# S4 method for parameter_list as.param(.x, ...)

# S4 method for missing as.param(.x, ...)

# S4 method for mrgmod $(x, name)

Arguments

.x

the model object

...

passed along or name/value pairs to update the parameters in a model object

.y

list to be merged into parameter list

.pat

a regular expression (character) to be applied as a filter for which parameters to show when printing

.strict

if TRUE, all names to be updated must be found in the parameter list

object

passed to show

x

mrgmod object

name

parameter to take

Value

An object of class parameter_list (see numericlist).

Details

Can be used to either get a parameter list object from a mrgmod model object or to update the parameters in a model object. For both uses, the return value is a parameter_list object. For the former use, param is usually called to print the parameters to the screen, but the parameter_list object can also be coreced to a list or numeric R object.

Examples

Run this code
# NOT RUN {
## example("param")
mod <- mrgsolve:::house()

param(mod)
param(mod, .pat="^(C|F)") ## may be useful when large number of parameters

class(param(mod))

param(mod)$KA

as.list(param(mod))
as.data.frame(param(mod))

# }

Run the code above in your browser using DataLab