compress: Compress PTAGIS Data

View source: R/compress.R

compressR Documentation

Compress PTAGIS Data

Description

The function takes complete capture histories downloaded from PTAGIS and compresses them. This involves assigning nodes to the detection locations (e.g. sites, arrays, antennas, etc.), and summarizing the first and last detection time on each node as well as how many detections were made during that slot. Slots can be defined to include a maximum number of minutes, or not.

Usage

compress(
  cth_file = NULL,
  file_type = c("PTAGIS", "Biologic_csv", "raw"),
  max_minutes = NA,
  configuration = NULL,
  units = c("mins", "auto", "secs", "hours", "days", "weeks"),
  ignore_event_vs_release = FALSE,
  filter_orphan_disown_tags = TRUE
)

Arguments

cth_file

is the path to the complete tag history file

file_type

describes the source of the complete tag history file.

If PTAGIS, then cth_file should be a PTAGIS observation file downloaded as a csv from PTAGIS. This must be the output from a Complete Tag History query (part of the Advanced Reporting). This query should contain: Tag, Mark Species, Mark Rear Type, Event Type, Event Site Type, Event Site Code, Event Date Time, Antenna, Antenna Group Configuration, Event Release Site Code, and Event Release Date Time.

If Biologic_csv, that implies the data was downloaded from Biologic software in a .csv format.

If raw, that implies the data was downloaded directly from the reader, in either a .log or .xlsx format. In this case, the largest string containing alphabetic characters in the file name will be assigned as the site code.

max_minutes

maximum number of minutes between detections of a tag before it's considered a different "slot" of detections. Default is 'NA', which means a new slot is only defined by detections on a new node.

configuration

is a data frame which assigns node names to unique site, antenna, and site configuration ID combinations. One example can be built with the function 'buildConfig'. If no configuration file is provided, nodes are considered site codes by default. If nodes are assigned, the column name should be 'node'.

units

character string. Units in which the results are desired. Can be abbreviated.

ignore_event_vs_release

Should the function attempt to choose whether to use the event time value or the event release time value for different release batches? Default is 'FALSE'. If set to 'TRUE', the event time value will be used

Value

a tibble

Author(s)

Kevin See

Examples

cth_file = system.file("extdata", "PRO_Steelhead_2019.csv", package = "PITcleanr")
compress(cth_file)

KevinSee/PITcleanr documentation built on Feb. 27, 2024, 11:03 p.m.