Blockquote
I got eye tracking gaze data in the form of x/y coordinates and timestamps.
Now I want to plot the saccades using the R package saccades
. Unfortunately, it doesn't work. I guess it's a matter of having the data in the wrong format.
My data:
> View(EUFKDCDL_Q09AS_saccades_2)
> head(EUFKDCDL_Q09AS_saccades)
# A tibble: 6 x 4
time x y trial
<dbl> <dbl> <dbl> <dbl>
1 1550093577941 732 391 1
2 1550093577962 706 320 1
3 1550093577980 666 352 1
4 1550093578000 886 288 1
5 1550093578017 787 221 1
6 1550093578037 729 302 1
The code that didn't work:
> fixations <- detect.fixations(EUFKDCDL_Q09AS_saccades)
Error in detect.fixations(EUFKDCDL_Q09AS_saccades) :
No saccades were detected. Something went wrong.
The full code that shouldwork according github (it'swith the sample data):
> library(saccades)
> data(samples)
> head(samples)
time x y trial
1 0 53.18 375.73 1
2 4 53.20 375.79 1
3 8 53.35 376.14 1
4 12 53.92 376.39 1
5 16 54.14 376.52 1
6 20 54.46 376.74 1
> fixations <- detect.fixations(samples)
> head(fixations[c(1,4,5,10)])
trial x y dur
0 1 53.81296 377.40741 71
1 1 39.68156 379.58711 184
2 1 59.99267 379.92467 79
3 1 18.97898 56.94046 147
4 1 40.28365 39.03599 980
5 1 47.36547 35.39441 1310
> diagnostic.plot(samples, fixations)
So there must be a problem with how my data is structured I guess? What does the mean?
I hope that any of you can help me creating this saccade plot as in the sceenshot attached
I am an R newbie as well...please be patient with me. :D