ct_dp_filter: Filter camera trap data package

View source: R/camtrapdp.R

ct_dp_filterR Documentation

Filter camera trap data package

Description

Subsets observations in camera trap data package, retaining all rows that satisfy the conditions.

Usage

ct_dp_filter(package, table = c("observations", "deployments", "media"), ...)

Arguments

package

Camera trap data package object, as returned by ct_read_dp().

table

Character indicating the table to read - one "observations", "deployments", or "media"

...

Filtering conditions, see dplyr::filter()

Value

A Camera Trap Data Package object of the same class as package, with the selected table subset to the rows satisfying the conditions in .... Related tables are updated so the package stays internally consistent (see camtrapdp::filter_observations()).

Examples


dp <- ct_dp_example()
ct_dp_filter(package = dp, table = "observation",
scientificName == "Vulpes vulpes", observationLevel == "event"
)

ct_dp_filter(package = dp, table = "deployments",
             latitude > 51.0, longitude > 5.0)


ct_dp_filter(package = dp, table = "media",
             captureMethod == "activityDetection", filePublic == FALSE
)


ct documentation built on Oct. 22, 2026, 1:07 a.m.