R/logbook_floating_object_part_DFAD_when_leaving_control.R
logbook_floating_object_part_DFAD_when_leaving_control.RdThe purpose of the logbook_floating_object_part_DFAD_when_leaving_control function is to provide a table of data that contains a incoherent with the the number of element of part of objects DFAD for floating object when leaving and the object operation
logbook_floating_object_part_DFAD_when_leaving_control(
dataframe1,
dataframe2,
output,
object_operation = c("1")
)data.frame expected. Csv or output of the function data_extraction, which must be done before using the logbook_floating_object_part_DFAD_when_leaving_control.
data.frame expected. Csv or output of the function data_extraction, which must be done before using the logbook_floating_object_part_DFAD_when_leaving_control.
character expected. Kind of expected output. You can choose between "message", "report" or "logical".
character expected. Default values: c("1"). Vector containing the codes for object operation with traditionally has a DFAD element when leaving
The function returns a character with output is "message", a data.frame with output is "report", a logical with output is "logical".
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
#Floating object 1, 2 and 3 are ok,
#Floating object 4 has no elements 1-1 when leaving
#Floating object 5 has no elements 1-1
#Floating object 6 has no elements
dataframe1 <- data.frame(floatingobject_id = c("1", "2", "3", "4", "5", "6"),
objectoperation_code = c("2", "1", "1", "1", "1", "1"))
dataframe2 <- data.frame(floatingobjectpart_id = c("1", "2", "3", "4", "5", "6"),
objectmaterial_code = c("2-1", "1-1-1", "1-1", "1-1-1", "1-1-2", "2-1"),
floatingobjectpart_whenleaving = c("true", "true", "true", "false", NA,
"true"),
floatingobject_id = c("1", "2", "3", "4", "4", "5"))
logbook_floating_object_part_DFAD_when_leaving_control(dataframe1, dataframe2, output = "report")
#> floatingobject_id objectoperation_code logical
#> 1 1 2 TRUE
#> 2 2 1 TRUE
#> 3 3 1 TRUE
#> 4 4 1 FALSE
#> 5 5 1 FALSE
#> 6 6 1 FALSE