gadget_update.gadgetlikelihood: Update gadget likelihood components in a likelihood file

View source: R/gadgetlikelihood.R

gadget_update.gadgetlikelihoodR Documentation

Update gadget likelihood components in a likelihood file

Description

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

Usage

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

Arguments

gf

The gadgetfile object to update

component

Either a replacement gadget_likelihood_component (from MFDB or rgadget), or a component type name

...

If a component type was provided above, the extra options to supply to gadget_likelihood_component

Examples

## Not run: 
library(magrittr)  # import %>% function
path <- './model'
gadgetlikelihood('likelihood', path, missingOkay = TRUE) %>%
   # Add an understocking component
   gadget_update(gadget_understocking_component(name = 'understocking')) %>% 
   gadget_update('understocking', name = 'understocking') %>% # Identical to above
   write.gadget.file(path)
   
## End(Not run)

Hafro/rgadget documentation built on July 21, 2022, 8:38 a.m.