trim                  package:secr                  R Documentation

_D_r_o_p _U_n_w_a_n_t_e_d _L_i_s_t _C_o_m_p_o_n_e_n_t_s

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

     Drop unwanted components from a 'list' object, usually to save
     space.

_U_s_a_g_e:

     ## Default S3 method:
     trim(object, drop, keep)
     ## S3 method for class 'secr':
     trim(object, drop = c("mask", "design", "design0", "D"), 
         keep = NULL)

_A_r_g_u_m_e_n_t_s:

  object: a list object 

    drop: vector identifying components to be dropped 

    keep: vector identifying components to be kept 

_D_e_t_a_i_l_s:

     'drop' may be a character vector of names or a numeric vector of
     indices. If both 'drop' and 'keep' are given then the action is
     conservative, dropping only components in 'drop' and not in
     'keep'.

_V_a_l_u_e:

     a list retaining selected components.

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

     Murray Efford murray.efford@otago.ac.nz

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

     data(secrdemo)
     names(secrdemo.0)
     names(trim(secrdemo.0))
     object.size(secrdemo.0)
     object.size(trim(secrdemo.0))

