A loop approach to event-log preparation for `bupaR`: can this be vectorized?
问题 Background I have real data from a PLC, that I prepare for conversion to an event-log for use with the package bupaR . The data below are limited and simplified but contain information concerning resource, timestamp, state-type, and event_ID. I achieved the desired transformation documented below with loops. My question is, can this be done without loops, in a "vectorised" way? Goal: From this, I want to detect when an error occurs and I want to track it till it ends. It ends when the `State