get_cam_op | R Documentation |
Returns the camera operation matrix as returned by camtrapR::cameraOperation().
get_cam_op(
package = NULL,
...,
station_col = "locationName",
camera_col = NULL,
session_col = NULL,
use_prefix = FALSE,
datapkg = lifecycle::deprecated()
)
package |
Camera trap data package object, as returned by
|
... |
filter predicates for filtering on deployments. |
station_col |
Column name to use for identifying the stations. Default:
|
camera_col |
Column name of the column specifying Camera ID. Default:
|
session_col |
Column name to use for identifying the session. Default:
|
use_prefix |
Logical ( |
datapkg |
Deprecated. Use |
The deployment data are by default grouped by locationName
(station ID in
camtrapR jargon) or another column specified by the user via the
station_col
argument. If multiple deployments are linked to same location,
daily efforts higher than 1 occur.
Partially active days, e.g. the first or the last day of a deployment, result in decimal effort values as in camtrapR::cameraOperation().
A matrix. Row names always indicate the station ID. Column names are dates.
Other exploration functions:
get_custom_effort()
,
get_effort()
,
get_n_individuals()
,
get_n_obs()
,
get_n_species()
,
get_rai()
,
get_rai_individuals()
,
get_record_table()
,
get_scientific_name()
,
get_species()
library(dplyr)
get_cam_op(mica)
# Applying filter(s) on deployments, e.g. deployments with latitude >= 51.18
get_cam_op(mica, pred_gte("latitude", 51.18))
# Specify column with station names
get_cam_op(mica, station_col = "locationID")
# Specify column with session IDs
mica_sessions <- mica
mica_sessions$data$deployments <- mica_sessions$data$deployments %>%
dplyr::mutate(session = ifelse(
stringr::str_starts(.data$locationName, "B_DL_"),
"after2020",
"before2020"
)
)
get_cam_op(mica_sessions, session_col = "session")
# Specify column with camera IDs
mica_cameras <- mica_sessions
mica_cameras$data$deployments$cameraID <- c(1, 2, 3, 4)
get_cam_op(mica_cameras, camera_col = "cameraID")
# Specify both session and camera IDs
get_cam_op(mica_cameras, camera_col = "cameraID", session_col = "session")
# Use prefix Station as in camtrapR's camera operation matrix
get_cam_op(mica, use_prefix = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.