Database to detion histories
Usage
DBdetectionHistory(
con,
ProjectShortName,
Species,
Iteration = 1,
byCamera,
occasionStartTime = 0,
camerasIndependent = TRUE,
output = "binary",
occasionLength = 1,
includeEffort = TRUE,
day1 = "station",
...
)
Arguments
- con
database connection string (as returned via weda_connect())
- ProjectShortName
Project short name (single value/project must be provided)
- Species
Common species name/s to obtain detection histories for (e.g. Leadbeater's Possum)
- Iteration
Iteration of survey (only single value allowed, loop function if multiple iterations required)
- byCamera
passed to camtrapR: logical. If TRUE, camera operability matrix is computed by camera, not by station (requires cameraCol)
- occasionStartTime
passed to camtrapR: integer. time of day (the full hour) at which to begin occasions. Replaces occasionStartTime from detectionHistory and spatialDetectionHistory.
- camerasIndependent
passed to camtrapR: logical. Return number of active camera traps by station? Only if byCamera is FALSE and allCamsOn is FALSE. If camerasIndependent is TRUE, output values will be the number of operational cameras at a station. If camerasIndependent is FALSE, the value is 1 if at least 1 camera was operational, otherwise 0. In both cases, values are NA if no camera was set up.
- output
passed to camtrapR: character. Return binary detections ("binary") or counts of detections ("count")
- occasionLength
passed to camtrapR: integer. occasion length in days
- includeEffort
passed to camtrapR: logical. Compute trapping effort (number of active camera trap days per station and occasion)?
- day1
passed to camtrapR: character. When should occasions begin: station setup date ("station"), first day of survey ("survey"), a specific date (e.g. "2015-12-31")?
- ...
additional arguments passed to
camtrapR::detectionHistory()
Value
Depending on the value of includeEffort
and
scaleEffort
, a list with either 1, 2 or 3 elements. The first element
is the species detection history. The second is the optional effort matrix
and the third contains the effort scaling parameters.
- detection_history
A species detection matrix
- effort
A matrix giving the number of active camera trap days per station and occasion (= camera trapping effort). It is only returned if
includeEffort = TRUE
- effort_scaling_parameters
Scaling parameters of the effort matrix. It is only returned if
includeEffort
andscaleEffort
areTRUE
Examples
if (FALSE) { # \dontrun{
con <- weda::weda_connect(password = keyring::key_get(service = "ari-dev-weda-psql-01",
username = "psql_user"), username = "psql_user")
lbp_det_hist <- DBdetectionHistory(con,
ProjectShortName = "FPSP_LBPCT",
Species = "Leadbeater's Possum",
Iteration = 1,
byCamera = TRUE,
occasionStartTime = 0,
camerasIndependent = TRUE,
output = "binary",
occasionLength = 1,
includeEffort = FALSE,
scaleEffort = FALSE,
day1 = "station")
} # }