metier: Method metier

Description Generic function Methods Author(s) See Also Examples

Description

metier returns a linkS4class{FLMetier} object from a linkS4class{FLFleet}. They can also be accessed directly by using the '[' and '[[' methods, see example below.

Generic function

metier(object,metier)

Methods

signature(object=FLFleet, metier=character) :

Returns the FLMetier with the given name.

Author(s)

The FLR Team

See Also

FLMetier, FLFleet, FLCatch, Extract-FLCore

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
data(bt4)
names(metiers(bt4))

# calling the FLMetier with the metier method
met <- metier(bt4,metier='TBB')
met <- metier(bt4,'TBB')

# calling the lower levels with the '[' and the '[[' operators
fl1  <- bt4['TBB']      # returns a fleet with only the 'TBB' metier
met1 <- bt4[['TBB']]    # returns the metier

fl2  <- bt4['TBB','ple'] # returns a fleet with only the 'ple' catch for 'TBB' metier
fl3  <- bt4[,'ple']      # returns a fleet with only the 'ple' catch

# possible combinations of the two include:

ca1 <-  bt4[['TBB']][['ple']] # returns the 'ple' FLCatch from metier 'TBB'
met2 <- bt4[['TBB']]['ple']   # returns the 'TBB' metier with only the 'ple' catches

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