sub-.records: Subsetting method for record tables

[.recordsR Documentation

Subsetting method for record tables

Description

Ensures the records class (and its attributes) is only retained when the columns they point to are still present after subsetting. This covers base R subsetting (x[...]), which does not go through dplyr's dplyr_reconstruct machinery.

Usage

## S3 method for class 'records'
x[i, j, ..., drop]

Arguments

x

an object used to select a method

i

row index

j

column index

...

further arguments passed to or from other methods

drop

logical, whether to simplify to a vector when selecting a single column


camtrapR documentation built on July 28, 2026, 5:10 p.m.