Checks the coherence of the species caught according to their distribution area.

obs_catch_ocean_control(catch)

Arguments

catch

data.frame expected. All catches during the time range selected.

Value

The function returns one data.frame.

Details

The input dataframe must contain all these columns for the function to work :

  • catch_id

  • species_faocode

  • ocean_label

  • speciesocean_label

Note

Version 1.0

Author

Chloé Tellier, Esther Mollier, Philippe S. Sabarros

Examples

#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