dims                 package:FLCore                 R Documentation

_L_i_s_t _w_i_t_h _i_n_f_o_r_m_a_t_i_o_n _o_n _o_b_j_e_c_t _d_i_m_e_n_s_i_o_n_s

_D_e_s_c_r_i_p_t_i_o_n:

     '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:

     _q_u_a_n_t Length of the first dimensions, i.e. number of ages,
          lengths, etc.

     _m_i_n First quant

     _m_a_x Last quant

     _y_e_a_r Number of years

     _m_i_n_y_e_a_r First year in series

     _m_a_x_y_e_a_r Last year in series

     _c_o_h_o_r_t Number of cohorts

     _m_i_n_c_o_h_o_r_t First cohort in series

     _m_a_x_c_o_h_o_r_t Last cohort in series

     _u_n_i_t Lengt of the third ('unit') dimension

     _s_e_a_s_o_n Lengt of the fourth ('season') dimension

     _a_r_e_a Lengt of the fifth ('area') dimension

     _i_t_e_r Lengt of the sixth ('iter') dimension

     _m_e_t_i_e_r_s Names of the metiers found in an 'FLFleet' or 'FLFleets'
          object

     _s_p_p 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.

_G_e_n_e_r_i_c _f_u_n_c_t_i_o_n:

     dims(obj)

_M_e_t_h_o_d_s:


      _s_i_g_n_a_t_u_r_e(_o_b_j=_F_L_Q_u_a_n_t) : Describe method

      _s_i_g_n_a_t_u_r_e(_o_b_j=_F_L_C_o_m_p) : Describe method

_A_u_t_h_o_r(_s):

     The FLR Team

_S_e_e _A_l_s_o:

     'dimnames', 'FLQuant'

_E_x_a_m_p_l_e_s:

     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)]]

