update_model: Update components of an object of class "gadget_model"

Description Usage Arguments Value Examples

Description

Update components of an object of class "gadget_model"

Usage

1
2
3
4
5
6
7
8
9
update_model(mod_obj, comp, item = NULL, ...)

update_stock(mod_obj, stockname, comp, item = NULL, ...)

update_fleet(mod_obj, fleetname, ...)

add_fleet(mod_obj, fleet)

rm_fleet(mod_obj, fleetname)

Arguments

mod_obj

A list of class gadget_model, see make_gadget_model or read_gadget_model

comp

Character vector of the component to update (i.e. stocks, fleets, etc.)

...

Named arguments corresponding to the appropriate name in the respective gadget model component (i.e. for "stocks" the named argument could be growthparameters = c(150, 10, 1e-06, 3))

fleetname

Character. The name of the fleet already present in a Gadget model to either update or remove

fleet

List of type gadget_fleet or gadget_fleets to be added to Gadget model

Value

A list of class gadget_model the same as that of mod_obj, but updated with the arguments given in ...

Examples

1
2
3
4
path <- system.file(gad_mod_dir, package = "gadgetSim")
mod <- read_gadget_model(path = path)
new_mod <- update_model(mod, "stocks",
                        growthparameters = c(150, 10, 1e-06, 3))

inspktrgadget/gadgetSim documentation built on May 10, 2019, 9:51 a.m.