Checks the coherence of the species caught according to their distribution area.
obs_catch_ocean_control(catch)data.frame expected. All catches during the time range selected.
The function returns one data.frame.
The input dataframe must contain all these columns for the function to work :
catch_id
species_faocode
ocean_label
speciesocean_label
Version 1.0
#Catch 1 is ok: a blue marlin found in the Indian ocean.
#Catch 2 is ok: a black marlin found in the Indian ocean.
#Catch 3 is not ok: a black marlin found in the Atlantic ocean.
catch <- data.frame(catch_id = c("1", "2", "3"),
species_faocode = c("BUM", "BLM", "BLM"),
ocean_label = c("Indian", "Indian", "Atlantic"),
speciesocean_label = c("Indian", "Indian", NA))
obs_catch_ocean_control(catch)
#> catch_id species_faocode ocean_label logical
#> 1 1 BUM Indian TRUE
#> 2 2 BLM Indian TRUE
#> 3 3 BLM Atlantic FALSE