usage                  package:secr                  R Documentation

_D_e_t_e_c_t_o_r _U_s_a_g_e

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

     Extract or replace usage information of a 'traps' object.

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

     usage(object, ...)
     usage(object) <- value

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

  object: a 'traps' object 

   value: a matrix of traps x occasions 1 if trap[i] used on
          occasion[j], zero otherwise. 

     ...: other arguments (not used) 

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

     For replacement, the number of rows of 'value' must match exactly
     the number of traps in 'object'.

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

     usage(object) returns the usage matrix of the 'traps' object.
     'usage(object)' may be NULL.

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

     Murray Efford murray.efford@otago.ac.nz

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

     'traps'

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

     demo.traps <- make.grid(nx = 6, ny = 8)
     ## random usage over 5 occasions
     usage(demo.traps) <- matrix (sample(0:1, 48*5, replace = TRUE, 
         p = c(0.5,0.5)), nc = 5)
     usage(demo.traps)
     summary(demo.traps)

