I have fetched some information form the MySQL server into R which looks like as follows in my R dataframe:
barcode_no Inspection_date current_profile score Tag_log prod_log
12345678 2020-01-15 14:34:13 Large 10 C1 WIP
12345678 2020-01-15 18:33:11 Medium 20 C2 Hold
12345678 2020-01-15 13:23:24 Medium 50 C3 Hold
12345678 2020-01-15 12:12:23 Medium 70 Shipped
12345678 2020-01-15 11:12:45 Medium 120 C1 Shipped
12345678 2020-01-15 12:22:32 Small 150 C2 Shipped
12345678 2020-01-15 15:23:23 Small 10 C3 WIP
12345678 2020-01-15 16:34:08 Small 20 C2 …Run Code Online (Sandbox Code Playgroud)