Package 'atools'

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

Help Index


Calculate time interval between detections

Description

Calculate time interval between detections

Usage

calc_det_interval(object)

Arguments

object

an ATO

Value

an updated ATO


Worker function to create filtering vector

Description

Worker function to create filtering vector

Usage

create_filter_vec(object, slt = c("ani", "dep", "det", "tag", "obs"), checks)

Arguments

object

an ATO

slt

the ATO slot to filter

checks

a list of column names and respective values to filter with

Value

a logical vector


Exclude rows from an ATO slot

Description

If exclusion parameters are not provided, removes the entire slot.

Usage

exclude(
  object,
  slt = c("ani", "dep", "det", "tag", "obs"),
  ...,
  hard = FALSE,
  silent = FALSE
)

Arguments

object

an ATO

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

Value

the updated ATO


Wrapper to exclude detections that to not match the deployments

Description

Wrapper to exclude detections that to not match the deployments

Usage

exclude_orphan_dets(object, hard = FALSE)

Arguments

object

an ATO

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).

Value

the updated ATO


Filter rows from an ATO slot

Description

Filter rows from an ATO slot

Usage

filter(
  object,
  slt = c("ani", "dep", "det", "tag", "obs"),
  ...,
  hard = FALSE,
  silent = FALSE
)

Arguments

object

an ATO

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

Value

the updated ATO


Wrapper to filter detections and observations within the desired time period

Description

Wrapper to filter detections and observations within the desired time period

Usage

filter_datetime(object, from = "1970-01-01", to = "3000-01-01", hard = FALSE)

Arguments

object

an ATO

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).

Value

the updated ATO


wrapper to filter detections by ping deviation bands

Description

wrapper to filter detections by ping deviation bands

Usage

filter_ping_dev(object, bands, grace, hard = FALSE)

Arguments

object

an ATO

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).

Value

the updated ATO


Clear all previously applied (non-hard) filters

Description

Clear all previously applied (non-hard) filters

Usage

filter_reset(object, s)

Arguments

object

an ATO

s

the slot to be reset. If not provided, all slots are reset.

Value

the updated ATO


Wrapper to filter detections and observations that match the transmitters in the tag and dep slots.

Description

Wrapper to filter detections and observations that match the transmitters in the tag and dep slots.

Usage

filter_targeted(object, hard = FALSE)

Arguments

object

an ATO

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).

Value

the updated ATO