FLCore-accesors            package:FLCore            R Documentation

_A_c_c_e_s_o_r _a_n_d _r_e_p_l_a_c_e_m_e_n_t _m_e_t_h_o_d_s _f_o_r _c_o_m_p_l_e_x _S_4 _c_l_a_s_s_e_s

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

     Slots in all S4 classes defined in FLCore can be accessed and
     modified using these accessor and replacement methods. Methods are
     named after the slot they apply to.

     These are generic methods that can be extended for other classes.

     Accessors for objects of class FLCatch work slightly differently,
     as FLQuant slots in the embeded classes. See FLCatch-accesors.

     The replacement function 'model<-' can simultaneously modify a
     number of slots in objects of class 'FLModel' if a list is passed
     to it with named elements corresponding to slots in the class.
     This is used to modify model-related slots in a single operation:
     'model', 'logl' and 'initial'. A function, or a character with the
     name of a function returning such a list can also be passed.

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

     capacity(object)  capacity<-(object,value)  catch(object) 
     catch<-(object,value)  catch.n(object)  catch.n<-(object,value) 
     catch.wt(object)  catch.wt<-(object,value)  catch.q(object) 
     catch.q<-(object,value)  catch.sel(object) 
     crewshare<-(object,value)  crewshare(object)  details(object) 
     details<-(object,value)  discards(object) 
     discards<-(object,value)  discards.n(object) 
     discards.n<-(object,value)  discards.wt(object) 
     discards.wt<-(object,value)  discards.q(object) 
     discards.q<-(object,value)  discards.sel(object)  effort(object) 
     effort<-(object,value)  effshare(object)  effshare<-(object,value)
      fcost(object)  fcost<-(object,value)  fec(object) 
     fec<-(object,value)  fitted(object)  fitted<-(object,value) 
     harvest(object)  harvest<-(object,value)  harvest.spwn(object) 
     harvest.spwn<-(object, value)  index(object) 
     index<-(object,value)  index.q(object)  index.q<-(object,value) 
     index.var(object)  index.var<-(object,value)  landings(object) 
     landings<-(object,value)  landings.n(object) 
     landings.n<-(object,value)  landings.wt(object) 
     landings.wt<-(object,value)  landings.q(object) 
     landings.q<-(object,value)  landings.sel(object)  logl(object) 
     logl<-(object,value)  logLik(object)  logLik<-(object,value) 
     model(object)  model<-(object,value)  m(object)  m<-(object,value)
      m.spwn(object)  m.spwn<-(object,value)  n(object) 
     n<-(object,value)  params(object)  params<-(object,value) 
     price(object)  price<-(object,value)  residuals(object) 
     residuals<-(object,value)  sel.pattern(object) 
     sel.pattern<-(object,value)  spwn(object)  spwn<-(object,value) 
     stock(object)  stock<-(object,value)  stock.n(object) 
     stock.n<-(object,value)  stock.wt(object) 
     stock.wt<-(object,value)  wt(object)  wt<-(object,value) 
     vcost(object)  vcost<-(object,value)  vcov(object) 
     vcov<-(object,value)

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


     _o_b_j_e_c_t An FLR complex object for which we want to extract or
          modify a slot.

     _v_a_l_u_e An object to be placed in a given slot. This object needs to
          be of the corresponding class.

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

     The FLR Team

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

     FLComp, FLCatch-accesors

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

     data(ple4)
     summary(catch(ple4))
     catch(ple4) <- landings(ple4)

     # model<- modifies one or more slots
     flm <- FLSR(rec~ssb*a)
     model(flm)
     model(flm) <- rec~ssb^a
     model(flm) <- ricker()
     model(flm) <- list(model=rec~ssb*a+ssb*b, initial=function() return(c(a=1, b=1)))

