Skip to contents

This function provides direct API access to age data. For cached reference data, use lkup_age() instead.

Usage

lkup_read_age(
  species_id = NULL,
  age_class = NULL,
  is_first_reproduction = NULL,
  ...,
  includes = NULL,
  pages = list(omit = 1)
)

Arguments

species_id

integer, filter to a particular species by id

age_class

character, filter to a particular age class by name

is_first_reproduction

logical, filter to ages that represent the age at first reproduction

...

additional filters to include in the query

includes

character vector of related resources to include

pages

list of pagination arguments (size, number, omit)

Value

A tibble with columns: id, project_id, species_id, age_class, age_num, age_min_months, age_max_months, is_first_reproduction, created_at, updated_at. Additional columns may appear when includes is specified (e.g., nested project or species data).

Details

This function makes a direct API call to retrieve age data. Unless using custom filtering, consider using the cached lkup_age() function instead.

The includes argument can be used to retrieve related resources in the response. Possible options include:

  • project

  • species

Examples

if (FALSE) { # \dontrun{
# Direct API call
lkup_read_age()

# Filter to a particular species
lkup_read_age(species_id = 1)

# For cached reference data, use lookup instead
lkup_age(species_id = 1)
} # }