The 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.

logbook_vessel_activity_floating_object_missing_buoy_control(
  dataframe1,
  dataframe2,
  dataframe3,
  output,
  vessel_activity = c("13")
)

Arguments

dataframe1

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.

dataframe2

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.

dataframe3

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.

output

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

vessel_activity

character expected. Default values: c("13"). Vector containing the vessel activity code that must have a buoy.

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 :

  • floatingobject_id

  • activity_id

  • activity_id

  • vesselactivity_code

  • transmittingbuoy_id

  • floatingobject_id

Examples

#Floating object 1, 2 and 3 are ok,
#Floating object 4 has buoy missing
#Floating object 5 has vessel activity missing
dataframe1 <- data.frame(floatingobject_id = c("1", "2", "3", "4", "5"),
                         activity_id = c("1", "2", "3", "3", "4"))
dataframe2 <- data.frame(activity_id = c("1", "2", "3", "4"),
                         vesselactivity_code = c("13", "1", "13", NA))
dataframe3 <- data.frame(transmittingbuoy_id = c("1", "2"),
                         floatingobject_id = c("1", "3"))
logbook_vessel_activity_floating_object_missing_buoy_control(dataframe1,
                                                             dataframe2,
                                                             dataframe3,
                                                             output = "report")
#>   floatingobject_id logical count_buoy vesselactivity_code
#> 1                 1    TRUE          1                  13
#> 2                 2    TRUE          0                   1
#> 3                 3    TRUE          1                  13
#> 4                 4   FALSE          0                  13
#> 5                 5   FALSE          0                <NA>