metier {FLCore} | R Documentation

## Method metier

### Description

`metier` returns a `link{FLMetier-class}` object from a `link{FLFleet-class}`. 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

    data(bt4)
    names(bt4@metiers)

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

    # calling the lower levels with the '[' and the '[[' levels
    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

[Package FLCore version 2.2 Index]