ruleset: Set of verify rules for an FLR class

rulesetR Documentation

Set of verify rules for an FLR class

Description

Returns a set of standard rules to be used by the verify method for an object of a given class.

Usage

ruleset(object, ...)

## S4 method for signature 'FLStock'
ruleset(object, ...)

Arguments

object

An object of any FLR class for which the method has been defined.

...

Names of positions in the standard list to subset.

Details

A standard minimal set of rules to check FLStock objects against using the verify method. The included rules are (with names in italics) check that:

  • there are no NAs in any slot, anyna.

  • catch.wt, landings.wt, discards.wt and stock.wt > 0.

  • mat, m.spwn and harvest.spwn values are between 0 and 1.

  • harvest >= 0.

  • cohorts in the stock.n slot contain decreasing numbers, except for the plusgroup age.

Value

A named list containing the rules defined for for the class object belongs to.

Author(s)

The FLR Team

Examples

data(ple4)
ruleset(ple4)
# Extract single rule by name
ruleset(ple4, 'anyna')

flr/FLCore documentation built on May 4, 2024, midnight