FLCatch: FLCatch constructor

FLCatchR Documentation

FLCatch constructor

Description

Make an FLCatch object.

Catch data for a single species or stock unit is handled by the FLCatch class. Data is separated as landings and discards by age, in numbers, with the corresponding mean weights at age.

Usage

FLCatch(object, ...)

catch.sel(object, ...) <- value

discards.ratio(object, ...)

lrevenue(object, ...)

## S4 method for signature 'FLCatch'
landings.n(object)

## S4 replacement method for signature 'FLCatch,numeric'
landings.n(object) <- value

## S4 replacement method for signature 'FLCatch,numeric'
landings.wt(object) <- value

## S4 replacement method for signature 'FLCatch,numeric'
discards.n(object) <- value

## S4 replacement method for signature 'FLCatch,numeric'
discards.wt(object) <- value

## S4 replacement method for signature 'FLCatch,numeric'
catch.sel(object) <- value

## S4 replacement method for signature 'FLCatch,numeric'
price(object) <- value

## S4 replacement method for signature 'FLCatch,numeric'
catch.q(object) <- value

## S4 method for signature 'FLCatch'
landings(object)

## S4 method for signature 'FLCatch'
discards(object)

## S4 method for signature 'FLCatch'
catch(object)

## S4 method for signature 'FLCatch'
landings.n(object)

## S4 method for signature 'FLCatch'
discards.n(object)

## S4 method for signature 'FLCatch'
catch.n(object)

## S4 method for signature 'FLCatch'
catch.wt(object)

## S4 method for signature 'FLQuant'
FLCatch(object, ...)

## S4 method for signature 'missing'
FLCatch(object, ...)

## S4 method for signature 'FLCatch'
lrevenue(object)

## S4 method for signature 'FLCatch'
landings.sel(object)

## S4 method for signature 'FLCatch'
discards.sel(object)

## S4 method for signature 'FLCatch'
discards.ratio(object)

## S4 method for signature 'FLCatch,missing'
plot(x, y, ...)

Arguments

object

Either an FLQuant (to determine the size of the FLQuant slots) or missing

...

Other things

value

Replacement value

x

FLCatch

y

missing

Details

Make an FLCatch object.

This is class is used inside FLFishery to store the catches of a single stock or species caught by that fleet.

Value

An FLCatch object

Slots

catch.q

Parameters of the catchability function, (FLPar).

catch.sel

Selectivity at age as proportions over fully-selected ages, (FLQuant).

desc

Description of the data contents and origin, (character).

discards.n

Discards at age in numbers, (FLQuant).

discards.wt

Mean weight-at-age in the discards, (FLQuant).

name

Name of the object, e.g. species or stock code, (character).

landings.n

Landings at age in numbers, (FLQuant).

landings.wt

Mean weight-at-age in the landings, (FLQuant).

price

Mean price by age per unit of weight, (FLQuant).

range

Ranges of age and years, plusgroup, (numeric).

Validity

Length of dimensions 2:5

All FLQuant slots must share dimensions 2 to 5.

iter dim of length 1 or N

The 6th dimension in all FLQuant and FLPar slots must be 1 or N, where N is the same value for the whole object.

Length of dimensions 2:5

All FLQuant slots must share dimensions 2 to 5.

You can inspect the class validity function by using getValidity(getClassDef('FLCatch'))

Accessors

All slots in the class have accessor and replacement methods defined that allow retrieving and substituting individual slots.

The values passed for replacement need to be of the class of that slot. A numeric vector can also be used when replacing FLQuant slots, and the vector will be used to substitute the values in the slot, but not its other attributes.

Constructor

A construction method exists for this class that can take named arguments for any of its slots. All slots are then created to match the requirements of the class validity. If an unnamed FLQuant object is provided, this is used for sizing but not stored in any slot.

Methods

Methods exist for various calculations based on values stored in the class:

landings

Total landings as sum on 'age' of landings.n times landings.wt.

discards

Total discards as sum on 'age' of discards.n times discards.wt.

landings.sel

Selectivity at age in the landings as proportions over fully-selected ages, (FLQuant).

discards.sel

Selectivity at age in the discards as proportions over fully-selected ages, (FLQuant).

catch.n

Catch at age in numbers as landings.n plus discards.n.

catch.wt

Weighted average of landings.wt and discards.wt.

catch

Total catch as sum of landings and discards.

discards.ratio

Proportion at age of discards in catch.

plot

Standard plot for the FLCatch class.

Author(s)

The FLR Team

Iago Mosqueira, EC JRC.

See Also

FLComp

FLCatches, FLFishery

Examples


data(ple4)

# EXTRACT data from FLCore ple4, fake prices
fca <- FLCatch(name='PLE', desc='All NS PLE catches',
  landings.n=landings.n(ple4), landings.wt=landings.wt(ple4),
  discards.n=discards.n(ple4), discards.wt=discards.wt(ple4),
  price=landings.wt(ple4) * 23, catch.q=FLPar(q=1),
  catch.sel=catch.sel(ple4))

# Calculations
landings(fca)

catch.n(fca)
catch.wt(fca)


iagomosqueira/FLFishery documentation built on Nov. 10, 2023, 6:37 p.m.