Skip to contents

These functions are re-exported from spdgt.core for convenience. They help convert human-readable names to database IDs required by the _id variants of spdgt.sight functions.

Usage

lkup_species(species_name = NULL, species_id = NULL, enabled = TRUE)

lkup_species_id(species_name)

lkup_species_opts()

lkup_survey_type(
  species_name = NULL,
  species_id = NULL,
  survey_type_name = NULL,
  survey_type_id = NULL
)

lkup_survey_type_id(survey_type_name, species_name = NULL, species_id = NULL)

lkup_survey_type_opts(species_name = NULL, species_id = NULL)

lkup_dau(
  dau_name = NULL,
  dau_id = NULL,
  species_name = NULL,
  species_id = NULL
)

lkup_dau_id(dau_name, species_name = NULL, species_id = NULL)

lkup_dau_opts(species_name = NULL, species_id = NULL)

lkup_gmu(
  gmu_name = NULL,
  gmu_id = NULL,
  species_name = NULL,
  species_id = NULL,
  dau_name = NULL,
  dau_id = NULL
)

lkup_gmu_id(gmu_name, species_name = NULL, species_id = NULL)

lkup_gmu_opts(
  species_name = NULL,
  species_id = NULL,
  dau_name = NULL,
  dau_id = NULL
)

lkup_strata(
  strata_name = NULL,
  strata_id = NULL,
  survey_type_name = NULL,
  survey_type_id = NULL,
  species_name = NULL,
  species_id = NULL
)

lkup_strata_id(
  strata_name,
  species_name = NULL,
  species_id = NULL,
  survey_type_name = NULL,
  survey_type_id = NULL
)

lkup_strata_opts(
  species_name = NULL,
  species_id = NULL,
  survey_type_name = NULL,
  survey_type_id = NULL
)

lkup_ipm_param(
  species_name = NULL,
  species_id = NULL,
  param_name = NULL,
  param_id = NULL,
  target = NULL
)

lkup_ipm_param_id(param_name, species_name = NULL, species_id = NULL)

lkup_ipm_param_opts(species_name = NULL, species_id = NULL, target = NULL)

lkup_model(model_name = NULL, model_id = NULL)

lkup_model_id(model_name)

lkup_model_opts()

Details

Three patterns are available for each entity:

  • lkup_<entity>() - Returns full tibble of all records

  • lkup_<entity>_id() - Converts a name to its database ID

  • lkup_<entity>_opts() - Returns named vector for UI dropdowns