From 9f5d48419813632a4c86353b8d3b8b513fa4c23c Mon Sep 17 00:00:00 2001 From: Damiano Oldoni Date: Thu, 9 Nov 2023 15:20:00 +0100 Subject: [PATCH] Update vignette describing new features --- vignettes/camera-operation-matrix.Rmd | 32 +++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/vignettes/camera-operation-matrix.Rmd b/vignettes/camera-operation-matrix.Rmd index 20a6044f..03fa0759 100644 --- a/vignettes/camera-operation-matrix.Rmd +++ b/vignettes/camera-operation-matrix.Rmd @@ -90,3 +90,35 @@ You can also decide to use prefix `"Station"` in the station names as done by ca cam_op_with_prefix <- get_cam_op(mica, use_prefix = TRUE) cam_op_with_prefix[1:4,1:2] ``` + +### Session and camera IDs + +You can specify the column containing the camera IDs to be added to the station names following the camtrapR's convention: `Station__CAM_CameraID`. Only the row names are shown: + +```{r add_camera_IDs} +mica_cameras <- mica +mica_cameras$data$deployments$cameraID <- c(1, 2, 3, 4) +cam_op_with_camera_ids <- get_cam_op(mica_cameras, camera_col = "cameraID") +row.names(cam_op_with_camera_ids) +``` + +You cans also add the session IDs using `session_col` argument, following the camtrapR's convention: `Station__SESS_sessionID`: + +```{r add_session_IDs} +mica_sessions <- mica +mica_sessions$data$deployments$session <- c(1, 2, 3, 4) +cam_op_with_session_ids <- get_cam_op(mica_sessions, session_col = "session") +row.names(cam_op_with_session_ids) +``` + +To use both camera and session IDs, the camtrapR's convention `Station__SESS_SessionID__CAM_CameraID` is followed: + +```{r add_session_camera_IDs} +mica_sessions$data$deployments$cameraID <- c(1, 2, 3, 4) +cam_op_with_session_and_camera_ids <- get_cam_op( + mica_sessions, + camera_col = "cameraID", + session_col = "session" +) +row.names(cam_op_with_session_and_camera_ids) +```