FLModel                package:FLCore                R Documentation

_M_e_t_h_o_d _F_L_M_o_d_e_l

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

     Constructor method for objects of class 'FLModel-class'. This
     method is to be called by the constructor methods of classes
     extending 'FLModel'.

     An argument 'class' instructs the constructor about the exact
     class of the  returned object. Constructor methods for
     'FLModel'-based class should simply invoke this method with the
     appropriate class argument (See example below).

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

     FLModel(object)

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


      _s_i_g_n_a_t_u_r_e(_o_b_j_e_c_t=_f_o_r_m_u_l_a) : First argument is a formula
          describing the model, to be placed in the 'model' slot.

      _s_i_g_n_a_t_u_r_e(_o_b_j_e_c_t=_m_i_s_s_i_n_g) : Arguments, if given, are parsed and
          allocated by name to a iven slot. If none if provided, and
          empty 'FLModel' object is returned.

      _s_i_g_n_a_t_u_r_e(_o_b_j_e_c_t=_f_u_n_c_t_i_o_n) : A function returning a list with
          names equal to one or more of the slots in the class is
          called, and elements in that list are allocated by name. See
          'SRModels' for uses of this mechanism

      _s_i_g_n_a_t_u_r_e(_o_b_j_e_c_t=_c_h_a_r_a_c_t_e_r) : A function with his name is called,
          as above.

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

     The FLR Team

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

     FLComp

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

     # Normally, FLModel objects won't be created, as class lacks input slots
     summary(FLModel(length~width*alpha))

     # Objects of FLModel-based classes use their own constructor,
     # which internally calls FLModel
     fsr <- FLModel(rec~ssb*a, class='FLSR')
     is(fsr)
     summary(fsr)

     # An example constructor method for an FLModel-based class
     # create FLGrowth class with a single new slot, 'mass'
     setClass('FLGrowth', representation("FLModel",
       mass='FLArray'))

     # define creator method, based on FLModel()
     setGeneric('FLGrowth', function(object, ...)
                     standardGeneric('FLGrowth'))
     setMethod('FLGrowth', signature(object='ANY'),
       function(object, ...)
         FLModel(object, class='FLGrowth', ...))

