gadget_update.gadgetfleet.Rd
Replace and/or append new fleet comonents to an existing file
# S3 method for gadgetfleet
gadget_update(gf, component, ...)
The gadgetfile object to update
Either a replacement gadget_fleet_component
(from MFDB or rgadget), or a component type name
If a component type was provided above, the extra options to supply to gadget_fleet_component
if (FALSE) {
library(magrittr) # import %>% function
path <- './model'
gadgetfleet('fleet', path, missingOkay = TRUE) %>%
gadget_update( # Add a fleet component
'totalfleet',
name = 'comm',
data = data.frame(year = 1990, step = 1, area = 1, weight = 1)) %>%
write.gadget.file(path)
}