| Title: | Tools to Manipulate ATO |
|---|---|
| Description: | Provides tools to manipulate ATO objects. Includes functions for filtering, excluding, and additional calculations. |
| Authors: | Hugo Flávio [aut, cre] |
| Maintainer: | Hugo Flávio <[email protected]> |
| License: | GPL-3 |
| Version: | 0.0.0.9001 |
| Built: | 2026-06-03 18:31:58 UTC |
| Source: | https://github.com/trackyverse/atools |
Calculate time interval between detections
calc_det_interval(object)calc_det_interval(object)
object |
an |
an updated ATO
Worker function to create filtering vector
create_filter_vec(object, slt = c("ani", "dep", "det", "tag", "obs"), checks)create_filter_vec(object, slt = c("ani", "dep", "det", "tag", "obs"), checks)
object |
an ATO |
slt |
the ATO slot to filter |
checks |
a list of column names and respective values to filter with |
a logical vector
If exclusion parameters are not provided, removes the entire slot.
exclude( object, slt = c("ani", "dep", "det", "tag", "obs"), ..., hard = FALSE, silent = FALSE )exclude( object, slt = c("ani", "dep", "det", "tag", "obs"), ..., hard = FALSE, silent = FALSE )
object |
an |
slt |
The slot to be filtered. |
... |
named arguments to exclude by. The argument's name must match one of the column names in the target slot. If only one value is provided, data is excluded by exact match. If two values are provided for continuous variables, data is filtered within the interval provided. If three or more values are provided, data is filtered by exact match. If no arguments are provided, the entire slot is removed. |
hard |
If false (the default), animal rows are flagged as invalid through the valid column, but kept in the dataset. Switch to true to drop the rows that do not fit the filtering criteria (useful to improve performance when handling very large datasets). |
silent |
Logical: Supress summary messages |
the updated ATO
Wrapper to exclude detections that to not match the deployments
exclude_orphan_dets(object, hard = FALSE)exclude_orphan_dets(object, hard = FALSE)
object |
an |
hard |
If false (the default), detections are flagged as invalid through the invalid column, but kept in the dataset. Switch to true to completely remove the detections from the dataset (useful to improve performance when handling very large datasets). |
the updated ATO
Filter rows from an ATO slot
filter( object, slt = c("ani", "dep", "det", "tag", "obs"), ..., hard = FALSE, silent = FALSE )filter( object, slt = c("ani", "dep", "det", "tag", "obs"), ..., hard = FALSE, silent = FALSE )
object |
an |
slt |
The slot to be filtered. |
... |
named arguments to filter for. The argument's name must match one of the column names in the animals slot. If only one value is provided, data is filtered by exact match. If two values are provided for continuous variables, data is filtered within the interval provided. If three or more values are provided, data is filtered by exact match. |
hard |
If false (the default), animal rows are flagged as invalid through the valid column, but kept in the dataset. Switch to true to drop the tags that do not fit the filtering criteria (useful to improve performance when handling very large datasets). |
silent |
Logical: Supress summary messages |
the updated ATO
Wrapper to filter detections and observations within the desired time period
filter_datetime(object, from = "1970-01-01", to = "3000-01-01", hard = FALSE)filter_datetime(object, from = "1970-01-01", to = "3000-01-01", hard = FALSE)
object |
an |
from |
Filter data from this timestamp (included). Can be posixct or character. |
to |
Filter data up to this timestamp (included). Can be posixct or character. |
hard |
If false (the default), animal rows are flagged as invalid through the valid column, but kept in the dataset. Switch to true to drop the tags that do not fit the filtering criteria (useful to improve performance when handling very large datasets). |
the updated ATO
wrapper to filter detections by ping deviation bands
filter_ping_dev(object, bands, grace, hard = FALSE)filter_ping_dev(object, bands, grace, hard = FALSE)
object |
an |
bands |
a vector of deviation bands to filter |
grace |
width of the bands to extract |
hard |
If false (the default), animal rows are flagged as invalid through the valid column, but kept in the dataset. Switch to true to drop the tags that do not fit the filtering criteria (useful to improve performance when handling very large datasets). |
the updated ATO
Clear all previously applied (non-hard) filters
filter_reset(object, s)filter_reset(object, s)
object |
an |
s |
the slot to be reset. If not provided, all slots are reset. |
the updated ATO
Wrapper to filter detections and observations that match the transmitters in the tag and dep slots.
filter_targeted(object, hard = FALSE)filter_targeted(object, hard = FALSE)
object |
an |
hard |
If false (the default), animal rows are flagged as invalid through the valid column, but kept in the dataset. Switch to true to drop the tags that do not fit the filtering criteria (useful to improve performance when handling very large datasets). |
the updated ATO