I have collected eye data in an experiment, where readers read a short text. My data is organized so that one row represents one tracking point (usually every 8ms). The sampling rate of my eyetracker is 60Hz. Below, I provide an example of the data:
No. Name Time..ms. Timegap..ms. Duration Gaze.X Gaze.Y Pupil.Diameter.Left..mm.
1 1 P 1 0 0 0 692 515 2,87
2 2 P 1 8 8 8 679 474 2,87
3 3 P 1 16 8 8 698 479 2,89
4 4 P 1 24 8 8 704 499 2,86
5 5 P 1 33 8 8 706 435 2,86
6 6 P 1 41 8 8 692 429 2,84
Pupil.Diameter.Right..mm. X.offset Y.offset Mouse.X.coord Mouse.Y.coord
1 3,06 0 0 5133 2679
2 3,02 0 0 5133 2679
3 3,02 0 0 5133 2679
4 3,02 0 0 5133 2679
5 2,95 0 0 5133 2679
6 2,95 0 0 5133 2679
AOI Left.Eye.X Left.Eye.Y Right.Eye.X Right.Eye.Y Blinks
1 AOI_4.0.1,AOI_4.1.3,AOI_4.2.28 731 332 654 701 NA
2 AOI_4.0.1,AOI_4.1.3,AOI_4.2.28 715 260 645 687 NA
3 AOI_4.0.1,AOI_4.1.3,AOI_4.2.28 740 302 656 659 NA
4 AOI_4.0.1,AOI_4.1.3,AOI_4.2.28 729 316 679 682 NA
5 AOI_4.0.1,AOI_4.1.3,AOI_4.2.28 762 277 651 596 NA
6 AOI_4.0.1,AOI_4.1.3,AOI_4.2.28 748 252 640 607 NA
Detection trial_column AOI_4_0_1 AOI_4_1_3 AOI_4_2_28 AOI_4_1_4 AOI_4_2_43 AOI_4_1_2
1 NA NA TRUE TRUE TRUE FALSE FALSE FALSE
2 NA NA TRUE TRUE TRUE FALSE FALSE FALSE
3 NA NA TRUE TRUE TRUE FALSE FALSE FALSE
4 NA NA TRUE TRUE TRUE FALSE FALSE FALSE
5 NA NA TRUE TRUE TRUE FALSE FALSE FALSE
6 NA NA TRUE TRUE TRUE FALSE FALSE FALSE
In the AOI Columns, there is the information wether the eyes hit the aoi at this time point or not (single AOIs represent the single words). I struggle with finding the right R package for this (most eyetracking packages are designed for specific eyetrackers) or do not take looking into AOIs in consideration. I would be happy for any recommendations on this.
I tried to write a code myself where a definition of a minimum of 13 rows in a line represents a fixation, but I struggle with getting out the fixation duration.