priors-FLBRP-method: calculates priors for biomass dynamic models

priors,FLBRP-methodR Documentation

calculates priors for biomass dynamic models

Description

Assign an FLPar object as an attribute to an FLBRP object using the '<-' operator.

Usage

## S4 method for signature 'FLBRP'
priors(object)

Arguments

x

An object of class FLBRP

i

The name of the attribute to be assigned (as a character string)

value

An object of class FLPar to be assigned as an attribute

Value

The modified FLBRP object with the new attribute

Examples

## Not run: 
  eql=FLBRP(...)  # Create or load an FLBRP object
  eql["priors"]<-FLPar()
  attributes(eql)$priors=calcPriors(eql)

## End(Not run)
setMethod("[<-", signature(object="FLBRP", i="priors", j="missing", value="FLPar"),
  function(object, i, value) {
    if (!inherits(value, "FLPar")) {
      stop("The assigned value must be an FLPar object")
    }
    
    attributes(object,i)=value

return(object)})

laurieKell/FLCandy documentation built on April 17, 2025, 5:23 p.m.