I am relatively new to R. I made some analyses on the observer XT software (software for video coding of behaviors). For other analyses, I have to transform the exported text file (i.e. the table) in another form.
The table extracted from the observer XT looks like this :
Datetime | Behavior | Event Type |
---|---|---|
30-07-2020 23:12:23 | browsing | State start |
30-07-2020 23:14:30 | browsing | State stop |
30-07-2020 23:16:04 | browsing | State start |
30-07-2020 23:16:05 | browsing | State stop |
Here you can see that each row shows the beginning or the end of a behavior.
My goal is to take two by two each line and create a begin / stop line like this.
Start_Datetime | Stop_Datetime | Behavior |
---|---|---|
30-07-2020 23:12:23 | 30-07-2020 23:14:30 | browsing |
30-07-2020 23:16:04 | 30-07-2020 23:17:05 | browsing |
Thanks in advance.