The purpose of the logbook_floating_object_part_dimensions_when_leaving_control function is to provide a table of data that contains a incoherent with the the number of dimensions element of part of objects DFAD for floating object when leaving and the object operation

logbook_floating_object_part_dimensions_when_leaving_control(
  dataframe1,
  dataframe2,
  output,
  object_operation = c("1"),
  object_material_code = c("1-1-1-1-6", "1-1-1-1-7", "1-1-1-1-8", "1-1-1-1-9",
    "1-1-2-10", "1-1-2-11", "1-1-2-12", "1-1-2-13"),
  threshold = 2
)

Arguments

dataframe1

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

dataframe2

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

output

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

object_operation

character expected. Default values: c("1"). Vector containing the codes for object operation with traditionally has a DFAD element when leaving

object_material_code

character expected. Default values: c("1-1-1-1-6", "1-1-1-1-7", "1-1-1-1-8", "1-1-1-1-9", "1-1-2-10", "1-1-2-11", "1-1-2-12", "1-1-2-13"). Vector containing the codes for object material with traditionally has a DFAD element when leaving

threshold

numeric expected. Default values: 2. Minimum number of object material requirements

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

  • objectoperation_code Dataframe 2:

  • floatingobjectpart_id

  • objectmaterial_code

  • floatingobjectpart_whenleaving

  • floatingobject_id

Examples

#Floating object 1, and 2 is ok,
#Floating object 3 does not have the required number (threshold) of elements (object_material_code)
#Floating object 4 has no elements object material
dataframe1 <- data.frame(floatingobject_id = c("1", "2", "3", "4"),
                         objectoperation_code = c("1", "8", "1", "1"))
dataframe2 <- data.frame(floatingobjectpart_id = c("1", "2", "3", "4"),
                         objectmaterial_code = c("1-1-1-1-6", "1-1-2-11", "1-1-1-1-7", "1-1"),
                         floatingobjectpart_whenleaving = c("3", "5", "1", "true"),
                         floatingobject_id = c("1", "1", "3", "3"))
logbook_floating_object_part_dimensions_when_leaving_control(dataframe1,
                                                             dataframe2,
                                                             output = "report")
#>   floatingobject_id objectoperation_code logical count_objet_part
#> 1                 1                    1    TRUE                2
#> 2                 2                    8    TRUE                0
#> 3                 3                    1   FALSE                1
#> 4                 4                    1   FALSE                0