The purpose of the logbook_vessel_activity_missing_floating_object_control function is to provide a table of data that contains a incoherent vessel activity and missing floating object.

logbook_vessel_activity_missing_floating_object_control(
  dataframe1,
  dataframe2,
  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_missing_floating_object_control.

dataframe2

data.frame expected. Csv or output of the function data_extraction, which must be done before using the logbook_vessel_activity_missing_floating_object_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 floating object.

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 :

  • activity_id

  • vesselactivity_code Dataframe 2:

  • floatingobject_id

  • activity_id

Examples

#Activity 1 and 2 are ok,
#Activity 3 has floating object missing
#Activity 4 has vessel activity missing
dataframe1 <- data.frame(activity_id = c("1", "2", "3", "4"),
                         vesselactivity_code = c("13", "1", "13", NA))
dataframe2 <- data.frame(floatingobject_id = c("1"),
                         activity_id = c("1"))
logbook_vessel_activity_missing_floating_object_control(dataframe1, dataframe2, output = "report")
#>   activity_id vesselactivity_code logical count_floating_object
#> 1           1                  13    TRUE                     1
#> 2           2                   1    TRUE                     0
#> 3           3                  13   FALSE                     0
#> 4           4                <NA>   FALSE                     0