R/logbook_vessel_activity_floating_object_missing_buoy_control.R
logbook_vessel_activity_floating_object_missing_buoy_control.RdThe purpose of the logbook_vessel_activity_floating_object_missing_buoy_control function is to provide a table of data that contains a incoherent vessel activity and missing buoy.
data.frame expected. Csv or output of the function data_extraction, which must be done before using the logbook_vessel_activity_floating_object_missing_buoy_control.
data.frame expected. Csv or output of the function data_extraction, which must be done before using the logbook_vessel_activity_floating_object_missing_buoy_control.
data.frame expected. Csv or output of the function data_extraction, which must be done before using the logbook_vessel_activity_floating_object_missing_buoy_control.
character expected. Kind of expected output. You can choose between "message", "report" or "logical".
character expected. Default values: c("13"). Vector containing the vessel activity code that must have a buoy.
character expected. Default values: c("1"). Vector containing the object operation code that must have a buoy.
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
objectoperation_code
activity_id
activity_id
vesselactivity_code
transmittingbuoy_id
floatingobject_id
#Floating object 1, 2, 3 and 4 are ok,
#Floating object 5 has buoy missing
#Floating object 6 has vessel activity missing
dataframe1 <- data.frame(floatingobject_id = c("1", "2", "3", "4", "5", "6"),
objectoperation_code = c("1", "1", "2", "1", "1", "1"),
activity_id = c("1", "2", "3", "4", "4", "5"))
dataframe2 <- data.frame(activity_id = c("1", "2", "3", "4", "5"),
vesselactivity_code = c("13", "1", "13", "13", NA))
dataframe3 <- data.frame(transmittingbuoy_id = c("1", "2"),
floatingobject_id = c("1", "4"))
logbook_vessel_activity_floating_object_missing_buoy_control(dataframe1,
dataframe2,
dataframe3,
output = "report")
#> floatingobject_id objectoperation_code logical count_buoy vesselactivity_code
#> 1 1 1 TRUE 1 13
#> 2 2 1 TRUE 0 1
#> 3 3 2 TRUE 0 13
#> 4 4 1 TRUE 1 13
#> 5 5 1 FALSE 0 13
#> 6 6 1 FALSE 0 <NA>