as.data.frame {secr} | R Documentation |
Method for generic as.data.frame
function that partially reverses make.capthist
.
## S3 method for class 'capthist'
as.data.frame(x, row.names = NULL, optional = FALSE, covariates = FALSE,
fmt = c("trapID", "XY"), ...)
## S3 method for class 'traps'
as.data.frame(x, row.names = NULL, optional = FALSE, usage = FALSE,
covariates = FALSE, ...)
## S3 method for class 'capthist'
as.array(x, ...)
x |
|
row.names |
unused argument of generic function |
optional |
unused argument of generic function |
covariates |
logical or a character vector of covariates to export |
fmt |
character string for capture format |
usage |
logical; if TRUE then usage columns are appended if present |
... |
other arguments (not used) |
By default individual covariates are not exported. When exported they are repeated for each detection of an individual.
A data frame or list of data frames (in the case of a multisession input).
For capthist objects –
The core columns are (Session, ID, Occasion, TrapID) or (Session, ID, Occasion, x, y),
depending on the value of fmt
. Additional columns for covariates and signal
strength (detector ‘signal’) are appended to the right.
For traps objects –
The core columns are (x, y). Usage columns are named u1, u2, ..., uS where S is the number of occasions.
The as.array
method for capthist objects returns an object with the same dimensions and dimnames but different class, or a list of such objects in the case of multisession input.
as.data.frame (captdata)
as.data.frame (traps(captdata))