The purpose of the logbook_activity_sample_control function is to provide a table of data that contains an inconsistency between the sample and the existence of the activity

logbook_activity_sample_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_activity_sample_control () function.

dataframe2

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

  • sample_id

  • sample_id

  • activity_id

Examples

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