Hi all!
I am quite new to R, so I would like to ask help with what kind of approach I should be taking.
I have time series data of gaze behavior that I would like to analyze which is structured as such:
Participant - Start - End - Duration - Gazed_Entity
The issue is that for each participant, I have unique time intervals. Although the time intervals are different for each gaze duration, it is occuring at the same time as other participants. This looks like as the following:
|Participant_Code|Start|End|Duration|Gazed_entity|
|Pink |00:00:00,000|00:00:50,368|00:00:50,368|Laptop|
|Pink |00:00:50,368|00:00:51,316|00:00:00,948|Yellow|
|Pink |00:00:51,316|00:01:12,287|00:00:20,971|Laptop|
|Pink |00:01:12,287|00:01:12,874|00:00:00,587|Other|
|Green|00:00:00,000|00:00:14,222|0:00:14,222|Laptop|
|Green|00:00:14,222|00:00:15,023|0:00:00,801|Pink|
|Green|00:00:15,023|00:01:16,201|0:01:01,178|Laptop|
|Green|00:01:16,201|00:01:16,869|0:00:00,668|Yellow|
For the analysis that I will be doing (which is the crqa package in R), I need to have equal length time intervals for each participant. How can I do this while also retaining "Gazed_Entity" that corresponds to that time interval?
The results should look something like this (which I am manually doing):
Shortest duration in this example: |00:00:00,587| so,
Pink - start: |00:00:00,000| end: |00:00:00,587| Gazed_entity: Laptop
Pink - start: |00:00:00,587| end: |00:00:01,174| Gazed_entity: Laptop
Pink - start: |00:00:01,174| end: |00:00:01,761| Gazed_entity: Laptop
I am not specifically asking for the formula, I have to figure it out based on the data I have; however, any suggestions towards the direction I should take in terms of functions and methodology would be appreciated!
Thanks all!