add_NODC_ID: Add NODC Id where missing

View source: R/add_nodc.R

add_NODC_IDR Documentation

Add NODC Id where missing

Description

Add NODC 10 digit numeric Id to predator or prey species where missing. The NODC Taxonomic Code was based on 12 digit "intelligent" code numbers. By "intelligent" code numbers we mean that information about taxonomy was built into the codes through the use of 2-digit couplets to represent one or more levels of the taxonomic hierarchy. For example, a species assigned a 10-digit code would belong to the genus represented by the first 8 digits of the code. The numerical hierarchy of the code numbers therefore reflected taxonomic hierarchy as well, and his hierarchy is useful for grouping species with e.g. similar energy contents, or within taxonomic model groups.

Usage

add_NODC_ID(
  stom,
  NODC_ID,
  predator_or_prey = c("predator", "prey"),
  stop_if_errror = FALSE,
  delete_first = FALSE,
  verbose = FALSE
)

Arguments

stom

Stomach data set of class STOMobs, from e.g. read_exchange_data.

NODC_ID

File Name including Latin (or other) predator or prey name (column species and column NODC). File 'NODC_latin.csv' in the package /inst directory is used as default.

predator_or_prey

Add missing NODC for "predator" or "prey".

stop_if_errror

Logical for stopping if NODC is not found.

delete_first

Logical for deleting exiting predator or prey NODC.

verbose

Show inserted NODC values.

Value

Stomach data of class STOMobs with added pred_nodc or codepred_nodc variables.

Examples

## Not run: add_NODC_ID(s)

MortenVinther/FishStomachs documentation built on Feb. 14, 2025, 7:33 a.m.