from_to_species_diet: Change predator or prey names.

View source: R/population_stom.R

from_to_species_dietR Documentation

Change predator or prey names.

Description

Change predator or prey names.

Usage

from_to_species_diet(
  d,
  pred_from_to = c("xcode", "xshort"),
  prey_from_to = c("xSMS_species", "xshort"),
  sp_info_file = file.path(config_dir, "species_info.csv"),
  refactor = TRUE
)

Arguments

d

Diet data set of class STOMdiet.

pred_from_to

Change predator name (variable pred_name) from an external lookup table using first element of pred_from_to as key and second element of pred_from_to as new name.

prey_from_to

Change prey name Same as above, but for prey name.

sp_info_file

CSV file with the fields used for pred_from_to and prey_from_to and and additional field "number" used for arranging predator and prey names as factors.

refactor

Logical for re-factor of predator and prey names in accordance with the sequence given by the "number" variable in the sp_info_file

Value

update data of class STOMdiet.


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