update.params_pansim: update parameters within a list of parameters

update.params_pansimR Documentation

update parameters within a list of parameters

Description

update parameters within a list of parameters

Usage

## S3 method for class 'params_pansim'
update(object, ..., delete_regex = NULL, .list = FALSE)

Arguments

object

a params_pansim object

...

a list of named elements, or a single named list if .list is specified

delete_regex

vector of regular expressions to remove

.list

treat the first argument as a named list?

Examples

pp <- list(params = c(a=2,b=1))
object <- c(a=1, b=0)
class(object) <- "params_pansim"
update(object,pp,.list=TRUE)
pp2 <- list(params = c(a=2))
update(object,pp, .list=TRUE)
update(object, a=2)
update(object, a=2, b=1)
update(object, cc1=2, cc2=3)
update(object, delete_regex="cc")

bbolker/McMasterPandemic documentation built on Aug. 25, 2024, 6:35 p.m.