The purpose of the logbook_trip_activity_control function is to provide a table of data that contains an inconsistency between the trip and the presence or not of activity associated with this trip

logbook_trip_activity_control(dataframe1, dataframe2, output)

Arguments

dataframe1

data.frame expected. Csv or output of the function data_extraction, which must be done before using the logbook_trip_activity_control () function.

dataframe2

data.frame expected. Csv or output of the function data_extraction, which must be done before using the logbook_trip_activity_control () function.

output

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

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 :

  • trip_id

  • trip_id

  • activity_id

Examples

#Trip 1 is ok,
#Trip 2 is not linked to an activity
dataframe1 <- data.frame(trip_id = c("1", "2"))
dataframe2 <- data.frame(trip_id = c("1"),
                         activity_id = c("1"))
logbook_trip_activity_control(dataframe1, dataframe2, output = "report")
#>   trip_id logical
#> 1       1    TRUE
#> 2       2   FALSE