FLStock-class: Class FLStock

Description Slots Extends Constructor Constructor arguments Methods Author(s) See Also Examples

Description

Data representation for a stock object. The FLStock object contains the available information for a fish stock, usually derived from a national or international sampling program, that will be used for conducting an assessment. Typically this will include information on total catches. In addition information on catch numbers, catch weights, maturity, natural mortality etc. may be provided.

The FLStock object also contains the slots stock, stock.n and harvest to hold information resulting from an analytical assessment.

Slots

catch

(FLQuant) Total catch weight by year

catch.n

(FLQuant) Catch numbers by quant and year

catch.wt

(FLQuant) Catch weights by quant and year

discards

(FLQuant) Total discards weight by year

discards.n

(FLQuant) Discard numbers by quant and year

discards.wt

(FLQuant) Discard weights by quant and year

landings

(FLQuant) Total landings weight by year

landings.n

(FLQuant) Landing numbers by quant and year

landings.wt

(FLQuant) Landing weights by quant and year

stock

(FLQuant) Total stock weight by year

stock.n

(FLQuant) Stock numbers by quant and year

stock.wt

(FLQuant) Stock weights by quant and year

m

(FLQuant) Natural mortality by quant and year

mat

(FLQuant) Proportion mature by quant and year

harvest

(FLQuant) Harvest rate or fishing mortality by quant and year. The units of the FLQuant should be set to 'harvest' or 'f' accordingly

harvest.spwn

(FLQuant) Proportion of harvest/fishing mortality before spawning by quant and year

m.spwn

(FLQuant) Proportion of natural mortality before spawning by quant and year

name

(character) Name of the stock

desc

(character) Description of stock

range

(numeric) Named vector containing the dimensions of the stock object

Extends

FLComp

Constructor

The FLStock(object, ...) constructor method allows simple creation of new FLStock with the methods described below.

signature(object=missing) :

Returns an FLStock using the first provided argument of class FLQuant for object sizing, or FLQuant() if none given.

signature(object=FLQuant) :

Returns and FLStock that uses object only for sizing.

Constructor arguments

object

An initial FLQuant only used for sizing.

plusgroup

The age/length to be considered as plusgroup.

...

Extra objects to be allocated to given slots.

Methods

[(base) :

Subsets an FLStock by subsetting each FLQuant slot in the object

signature(x=FLStock,i=ANY,j=ANY,drop=missing)

[<-(base) :

Assign to a subset of an FLStock an FLStock of equivalent dimension

signature(x=FLStock,i=ANY,j=ANY,value=missing)

as.FLBiol(FLCore) :

Convert an FLStock object to an FLBiol object

signature(object=missing)

as.FLSR(FLCore) :

Initialise an FLSR object from an FLStock object

signature(object=missing)

catch(FLCore) :

Get the catch slot from an FLStock object

signature(object=missing)

catch<-(FLCore) :

Assign values to the catch slot of an FLStock object

signature(object=FLStock,value=FLQuant)

catch<-(FLCore) :

Assign values to the catch, catch.n and catch.wt slots of an FLStock object

signature(object=FLStock,value=FLQuants)

catch.n(FLCore) :

Get the catch.n slot of an FLStock object

signature(object=missing)

catch.n<-(FLCore) :

Assign values to the catch.n slot of an FLStock object

signature(object=FLStock,value=FLQuant)

catch.wt(FLCore) :

Get the catch.wt slot of an FLStock object

signature(object=missing)

catch.wt<-(FLCore) :

Assign values to the catch.wt slot of an FLStock object

signature(object=FLStock,value=FLQuant)

coerce(methods) :

Force an object of class FLStock to another class using as(from, to)

signature(from=NULL,to=FLStock,strict=missing)

coerce(methods) :

Force an object of class FLBiol to an object of class FLStock. Uses as(from, to)

signature(from=FLBiol,to=FLStock,strict=missing)

coerce(methods) :

Force an object of class FLStock be an object of class FLBiol. Uses as(from, to)

signature(from=FLStock,to=FLBiol,strict=missing)

computeCatch(FLCore) :

Calculate the total catch weight by year for an FLStock

signature(object=missing)

computeDiscards(FLCore) :

Calculate the total discards weight by year for an FLStock

signature(object=missing)

computeLandings(FLCore) :

Calculate the total landings weight by year for an FLStock

signature(object=missing)

discards(FLCore) :

Get the discards slot of an FLStock object

signature(object=missing)

discards<-(FLCore) :

Assign values to the discards slot of an FLStock object

signature(object=FLStock,value=FLQuant)

discards.n(FLCore) :

Get the discards.n slot of an FLStock object

signature(object=missing)

discards.n<-(FLCore) :

Assign values to the discards.n slot of an FLStock object

signature(object=FLStock,value=FLQuant)

discards.wt(FLCore) :

Get the discards.wt slot of an FLStock object

signature(object=missing)

discards.wt<-(FLCore) :

Assign values to the discards.wt slot of an FLStock object

signature(object=FLStock,value=FLQuant)

harvest(FLCore) :

Get the harvest slot of an FLStock object

signature(object=missing)

harvest<-(FLCore) :

Assign values to the units of the harvest slot of an FLStock object

signature(object=FLStock,value=character)

harvest<-(FLCore) :

Assign values to the harvest slot of an FLStock object

signature(object=FLStock,value=FLQuant)

harvest.spwn(FLCore) :

Get the harvest.spwn slot from an FLStock object

signature(object=missing)

landings(FLCore) :

Get the landings slot of an FLStock object

signature(object=missing)

landings<-(FLCore) :

Assign values to the landings slot of an FLStock object

signature(object=FLStock,value=FLQuant)

landings.n(FLCore) :

Get the landings.n slot from an FLStock object

signature(object=missing)

landings.n<-(FLCore) :

Assign values to the landings.n slot of an FLStock object

signature(object=FLStock,value=FLQuant)

landings.wt(FLCore) :

Get the landings.wt slot of an FLStock object

signature(object=missing)

landings.wt<-(FLCore) :

Assign values to the landings.wt slot of an FLStock object

signature(object=FLStock,value=FLQuant)

m(FLCore) :

Get the m slot of an FLStock object

signature(object=missing)

m<-(FLCore) :

Assign values to the m slot of an FLStock object

signature(object=FLStock,value=FLQuant)

mat(FLCore) :

Get the mat slot of an FLStock object

signature(object=missing)

m.spwn(FLCore) :

Get the m.spwn slot of an FLStock object

signature(object=missing)

plot(graphics) :

A summary plot of an FLStock object

signature(x=FLStock,y=missing)

ssb(FLCore) :

Calculate SSB by year for an FLStock object

signature(object=missing)

ssbpurec(FLCore) :

Calculate SSB per recruit for an FLStock object

signature(object=missing)

stock(FLCore) :

Get the stock slot of an FLStock object

signature(object=missing)

stock.n(FLCore) :

Get the stock.n slot of an FLStock object

signature(object=missing)

stock.wt(FLCore) :

Get the stock.wt slot of an FLStock object

signature(object=missing)

trim(FLCore) :

Trim an FLStock object to a reduced range over the year or quant dimension

signature(object=missing)

Author(s)

The FLR Team

See Also

[, [<-, as.FLBiol, as.FLSR, catch, catch<-, catch.n, catch.n<-, catch.wt, catch.wt<-, coerce, computeCatch, computeDiscards, computeLandings, discards, discards<-, discards.n, discards.n<-, discards.wt, discards.wt<-, harvest, harvest<-, harvest.spwn, landings, landings<-, landings.n, landings.n<-, landings.wt, landings.wt<-, m, m<-, mat, m.spwn, plot, ssb, ssbpurec, stock, stock.n, stock.wt, trim, FLComp

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
data(ple4)

landings(ple4) #get the landings slot
landings(ple4) <- apply(landings.n(ple4)*landings.wt(ple4),2,sum)   # assign values to the landings slot

discards(ple4) <- computeDiscards(ple4)

harvest(ple4) <- 'f' # set the units of the harvest slot of an FLStock object

catch(ple4) <- computeCatch(ple4)
catch(ple4) <- computeCatch(ple4, slot="all")

ple4[,1] # subset the FLStock
trim(ple4, age=2:6, year=1980:1990) #trim the FLStock

ssb(ple4) # calculate SSB
ssbpurec(ple4) # calculate SSB per recruit

biol <- as(ple4, "FLBiol")  # coerce an FLStock to an FLBiol
flsr <- as.FLSR(ple4)       # initialise an FLSR object from an FLStock

FLCore documentation built on May 2, 2019, 5:46 p.m.