gadget_update.gadgetfleet: Update gadget fleet components in a fleet file

View source: R/gadgetfleet.R

gadget_update.gadgetfleetR Documentation

Update gadget fleet components in a fleet file

Description

Replace and/or append new fleet comonents to an existing file

Usage

## S3 method for class 'gadgetfleet'
gadget_update(gf, component, ...)

Arguments

gf

The gadgetfile object to update

component

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

Examples

## Not run: 
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)
   
## End(Not run)

bthe/rgadget documentation built on July 22, 2022, 7:24 a.m.