R/logbook_species_control.R
logbook_species_control.Rd
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")
)
data.frame expected. Csv or output of the function data_extraction, which must be done before using the logbook_species_control () function.
character expected. Kind of expected output. You can choose between "message", "report" or "logical".
character expected. Default values: c("YFT", "SKJ", "BET", "ALB", "LTA", "FRI", "TUN", "KAW", "LOT"). Vector of the species authorized.
The function returns a character with output is "message", a data.frame with output is "report", a logical with output is "logical"
The input dataframe must contain all these columns for the function to work :
samplespecies_id
species_fao_code
#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