traps                  package:secr                  R Documentation

_D_e_t_e_c_t_o_r _A_r_r_a_y

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

     An object of class 'traps' encapsulates a set of detector (trap)
     locations and related data. A method of the same name extracts or
     replaces the 'traps' attribute of a 'capthist' object.

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

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

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

  object: a 'capthist' object. 

   value: 'traps' object to replace previous. 

     ...: other arguments (not used). 

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

     An object of class 'traps' holds detector (trap) locations as a
     data frame of x-y coordinates. Trap identifiers are used as row
     names. The required attribute 'detector' records the type of
     detector ('single', 'multi' or 'proximity'). 

     Other possible attributes of a 'traps' object are trap-specific
     covariates ('covariates') and a matrix of binary (0/1) codes
     indicating whether each detector was used on each occasion
     ('usage'). If usage is specified, at least one detector must be
     'used' on each occasion.

_N_o_t_e:

     Generic methods are provided to select rows ('subset.traps'),
     combine two or more arrays ('rbind.traps'), shift an array
     ('shift.traps'), and to rotate an array ('rotate.traps').  The
     attributes 'usage' and 'covariates' may be extracted or replaced
     using generic methods of the same name.

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

     Murray Efford murray.efford@otago.ac.nz

_R_e_f_e_r_e_n_c_e_s:

     Efford, M. G. (2007) _Density 4.1: software for spatially explicit
     capture-recapture_. Department of Zoology, University of Otago,
     Dunedin, New Zealand. <URL: http://www.otago.ac.nz/density>

     Efford, M. G., Borchers D. L. and Byrom, A. E. (2009) Density
     estimation by spatially explicit capture-recapture:
     likelihood-based methods. In: D. L. Thomson, E. G. Cooch and M. J.
     Conroy (eds) _Modeling Demographic Processes in Marked
     Populations_. Springer, New York. Pp. 255-269.

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

     'make.grid', 'read.traps', 'plot.traps', 'secr.fit'

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

     demotraps <- make.grid(nx = 8, ny = 6, spacing = 30)
     demotraps    ## uses print method for traps
     summary (demotraps)

     plot (demotraps, border = 50, label = TRUE, offset = 8, 
         gridlines=FALSE)  

     ## generate an arbitrary covariate 'randcov'
     covariates (demotraps) <- data.frame(randcov = rnorm(48))

     ## overplot detectors that have high covariate values
     temptr <- subset(demotraps, covariates(demotraps)$randcov > 0.5)
     plot (temptr, add = TRUE, 
         detpar = list (pch = 16, col = 'green', cex = 2))  

