dims {FLCore}R Documentation

List with information on object dimensions

Description

dims return a named list with information on the dimensions and dimension names of a given object obj. The list returned could be extended in the future and currently contains, depending on the class of the object, some of the following:

quant
Length of the first dimensions, i.e. number of ages, lengths, etc.
min
First quant
max
Last quant
year
Number of years
minyear
First year in series
maxyear
Last year in series
cohort
Number of cohorts
mincohort
First cohort in series
maxcohort
Last cohort in series
unit
Lengt of the third (unit) dimension
season
Lengt of the fourth (season) dimension
area
Lengt of the fifth (area) dimension
iter
Lengt of the sixth (iter) dimension
metiers
Names of the metiers found in an FLFleet or FLFleets object
spp
Names of the catches found in an FLFleet or FLFleets object

Values in the returned list are of class numeric, unless dimnames are strings with no numeric translation, in which case the result is NA. In the case of metiers and spp, the result is of class character.

Please note that the name of the first element in the returned list changes with the name of the first dimension on the input object. Use quant to obtain the name and extract the relevant element from the result list.

Generic function

dims(obj)

Methods

signature(obj=FLQuant) :
Describe method
signature(obj=FLComp) :
Describe method

Author(s)

The FLR Team

See Also

dimnames, FLQuant

Examples

flq <- FLQuant(rnorm(96), dim=c(3,8,1,4), quant='age')
dims(flq)

# Number of seasons
dims(flq)$season

# Length of first dimension
dims(flq)[[quant(flq)]]

[Package FLCore version 2.2 Index]