Skip to contents

Subsets observations in a Camera Trap Data Package object, removing timelapse observations, i.e. observations where captureMethod = timeLapse. This function is a shortcut for filter_observations(x, captureMethod != "timelapse").

Usage

filter_out_timelapse(x)

Arguments

x

Camera trap data package object, as returned by camtrapdp::read_camtrapdp().

Value

x filtered.

See also

Examples

x <- example_dataset()

# `x` doesn't contain timelapse observations, returned as is
filter_out_timelapse(x)
#> A Camera Trap Data Package "camtrap-dp-example-dataset" with 3 tables:
#> • deployments: 4 rows
#> • media: 423 rows
#> • observations: 549 rows
#> 
#> And 1 additional resource:
#> • individuals
#> Use `unclass()` to print the Data Package as a list.

# Create a data package with timelapse observations
obs <- observations(x)
obs$captureMethod <- c(rep("timelapse", nrow(obs) - 1), "activityDetection")
observations(x) <- obs
# Filter out timelapse observations
filter_out_timelapse(x)
#> A Camera Trap Data Package "camtrap-dp-example-dataset" with 3 tables:
#> • deployments: 4 rows
#> • media: 1 rows
#> • observations: 1 rows
#> 
#> And 1 additional resource:
#> • individuals
#> Use `unclass()` to print the Data Package as a list.