Learn R Programming

camtrapR (version 3.1.0)

[.detHist: Subsetting method for detection history

Description

Ensures that subsetting a detHist object (e.g. x[1], x["detection_history"]) retains the detHist class and its attributes, so the result still prints via print.detHist instead of falling back to the default list print.

Usage

# S3 method for detHist
[(x, i, ...)

Arguments

x

an object of class detHist

i

index specifying elements to extract

...

further arguments passed to or from other methods