R/logbook_floating_object_buoy_id_redundancy_control.R
logbook_floating_object_buoy_id_redundancy_control.Rd
The purpose of the logbook_floating_object_buoy_id_redundancy_control function is to provide a table of data that contains a incoherent buoy operation on a same object.
logbook_floating_object_buoy_id_redundancy_control(
dataframe1,
dataframe2,
output,
operation_code = c("2", "3")
)
data.frame expected. Csv or output of the function data_extraction, which must be done before using the logbook_floating_object_buoy_id_redundancy_control.
data.frame expected. Csv or output of the function data_extraction, which must be done before using the logbook_floating_object_buoy_id_redundancy_control.
character expected. Kind of expected output. You can choose between "message", "report" or "logical".
character expected. Default values: c("2","3"). Vector containing the operation code to detected to avoid incoherence.
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 :
floatingobject_id
Dataframe 2:
transmittingbuoy_id
transmittingbuoyoperation_code
floatingobject_id
transmittingbuoy_code
dataframe1 <- data.frame(floatingobject_id = c("1","2","3","4", "5"))
dataframe2 <- data.frame(transmittingbuoy_id = c("1","2","3","4", "5", "6"),
floatingobject_id = c("1","2","3","3","5","5"),
transmittingbuoyoperation_code = c("2","3","2","4", "2", "3"),
transmittingbuoy_code = c("1","2","3","3", "1", "1"))
logbook_floating_object_buoy_id_redundancy_control(dataframe1, dataframe2, output = "report")
#> # A tibble: 5 × 3
#> floatingobject_id transmittingbuoy_code logical
#> <chr> <chr> <lgl>
#> 1 1 1 FALSE
#> 2 2 2 FALSE
#> 3 3 3 FALSE
#> 4 4 NA FALSE
#> 5 5 1 TRUE