The purpose of the logbook_category_species_forbidden_well_control function is to provide a table of data that contains an inconsistency between the weight categories and the species in the well

logbook_category_species_forbidden_well_control(
  dataframe1,
  output,
  species = c("SKJ"),
  weight_category = c("W-9")
)

Arguments

dataframe1

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

output

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

species

character expected. Default values: c("SKJ"). Vector of species that must not have certain weight categories in well (weight_category)

weight_category

character expected. Default values: c("W-9"). Vector of weight category codes that must not have certain species in well (species)

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 :

  • wellactivityspecies_id

  • species_fao_code

  • weightcategory_code

Examples

#Sample well 1 and 2 are ok,
#Sample well 3 is associated with the species concerned (species) and the weight category
#              concerned (weight_category)
dataframe1 <- data.frame(wellactivityspecies_id = c("1", "2", "3"),
                         weightcategory_code = c("W-1", "W-9", "W-9"),
                         species_fao_code = c("SKJ", "ALB", "SKJ"))
logbook_category_species_forbidden_well_control(dataframe1, output = "report")
#>   wellactivityspecies_id species_fao_code weightcategory_code logical
#> 1                      1              SKJ                 W-1    TRUE
#> 2                      2              ALB                 W-9    TRUE
#> 3                      3              SKJ                 W-9   FALSE