R/logbook_well_number_control.R
    logbook_well_number_control.RdThe purpose of the logbook_well_number_control function is to provide a table of data that contains an inconsistency between sample well number and associated trip well numbers
logbook_well_number_control(
  dataframe1,
  dataframe2,
  dataframe3,
  output,
  vessel_type = c("5", "6", "10")
)data.frame expected. Csv or output of the function data_extraction, which must be done before using the logbook_well_number_control () function.
data.frame expected. Csv or output of the function data_extraction, which must be done before using the logbook_well_number_control () function.
data.frame expected. Csv or output of the function data_extraction, which must be done before using the logbook_well_number_control () function.
character expected. Kind of expected output. You can choose between "message", "report" or "logical".
character expected. Default values: c("5", "6", "10"). Vector of codes for vessel types with a well plan.
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 :
  sample_id
  sample_well
  trip_id
  well_id
  trip_id
  well_label
  trip_id
  vesseltype_code
#Sample 1, 2 and 3 are ok,
#Sample 4 has different well,
#Sample 5 has no well
dataframe1 <- data.frame(sample_id = c("1", "2", "3", "4", "5"),
                         sample_well = c("well_1", "well_2", "well_2", "well_2", NA),
                         trip_id = c("1", "1", "2", "3", "3"))
dataframe2 <- data.frame(well_id = c("1", "2", "3"),
                         trip_id = c("1", "1", "3"),
                         well_label = c("well_1", "well_2", "well_1"))
dataframe3 <- data.frame(trip_id = c("1", "2", "3"),
                         vesseltype_code = c("6", "1", "6"))
logbook_well_number_control(dataframe1, dataframe2, dataframe3, output = "report")
#>   sample_id logical sample_well
#> 1         1    TRUE      well_1
#> 2         2    TRUE      well_2
#> 3         3    TRUE      well_2
#> 4         4   FALSE      well_2
#> 5         5   FALSE        <NA>