Learn R Programming

secr (version 2.5.0)

covariates: Covariates Attribute

Description

Extract or replace covariates

Usage

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

Arguments

object
an object of class traps, popn, capthist, or mask
value
a dataframe of covariates
...
other arguments (not used)

Value

  • covariates(object) returns the dataframe of covariates associated with object. covariates(object) may be NULL.

Details

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

Examples

Run this code
temptrap <- make.grid(nx = 6, ny = 8)
covariates (temptrap) <- data.frame(halfnhalf = 
    factor(rep(c("left","right"),c(24,24))) )
summary(covariates(temptrap))

Run the code above in your browser using DataLab