The purpose of the logbook_species_control function is to provide a table of data that contains an inconsistency between the species sampled and species authorized

logbook_species_control(
  dataframe1,
  output,
  species = c("YFT", "SKJ", "BET", "ALB", "LTA", "FRI", "TUN", "KAW", "LOT")
)

Arguments

dataframe1

data.frame expected. Csv or output of the function data_extraction, which must be done before using the logbook_species_control () function.

output

character expected. Kind of expected output. You can choose between "message", "report" or "logical".

species

character expected. Default values: c("YFT", "SKJ", "BET", "ALB", "LTA", "FRI", "TUN", "KAW", "LOT"). Vector of the species authorized.

Value

The function returns a character with output is "message", a data.frame with output is "report", a logical with output is "logical"

Details

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

  • samplespecies_id

  • species_fao_code

Examples

#Sample species 1 is ok,
#Sample species 2 has a species outside the list species
dataframe1 <- data.frame(samplespecies_id = c("1", "2"),
                         species_fao_code = c("YFT", "JOS"))
logbook_species_control(dataframe1, output = "report")
#>   samplespecies_id logical species_fao_code
#> 1                1    TRUE              YFT
#> 2                2   FALSE              JOS