get_tags: Get tag data

View source: R/get_tags.R

get_tagsR Documentation

Get tag data

Description

Get data for tags, with options to filter results. Note that there can be multiple records (acoustic_tag_id) per tag device (tag_serial_number).

Usage

get_tags(
  connection = con,
  tag_type = NULL,
  tag_subtype = NULL,
  tag_serial_number = NULL,
  acoustic_tag_id = NULL
)

Arguments

connection

A connection to the ETN database. Defaults to con.

tag_type

Character (vector). acoustic or archival. Some tags are both, find those with acoustic-archival.

tag_subtype

Character (vector). animal, ⁠built-in⁠, range or sentinel.

tag_serial_number

Character (vector). One or more tag serial numbers.

acoustic_tag_id

Character (vector). One or more acoustic tag identifiers, i.e. identifiers found in get_acoustic_detections().

Value

A tibble with tags data, sorted by tag_serial_number. See also field definitions. Values for owner_organization and owner_pi will only be visible if you are member of the group.

Examples

# Set default connection variable
con <- connect_to_etn()

# Get all tags
get_tags(con)

# Get archival tags, including acoustic-archival
get_tags(con, tag_type = c("archival", "acoustic-archival"))

# Get tags of specific subtype
get_tags(con, tag_subtype = c("built-in", "range"))

# Get specific tags (note that these can return multiple records)
get_tags(con, tag_serial_number = "1187450")
get_tags(con, acoustic_tag_id = "A69-1601-16130")
get_tags(con, acoustic_tag_id = c("A69-1601-16129", "A69-1601-16130"))

inbo/etn documentation built on Sept. 5, 2024, 10:35 p.m.