0

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 attachedsaccades plot

I am an R newbie as well...please be patient with me. :D

  • 2
    It's difficult to help in any meaningful way without a [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). That includes a representative sample of data that we can work with (i.e. not a picture), the code you've tried so far, what hasn't worked, and where you're trying to get. – camille Mar 01 '19 at 14:46
  • Have you looked at the documentation and visited the [github](https://github.com/tmalsburg/saccades) page for additional information? – bob1 Mar 01 '19 at 15:07
  • Hey I looked at the github code but I have to admit I am a R newbie. I changed my questions and added good and bad codes. I hope this helps! @camille @ bob1! Thank you ...and be patient with me :D – Stefan Christoph Mar 02 '19 at 15:31
  • The link in my comment has details on making an R question reproducible, such as how to include data and code that are accessible e.g. we can't run a picture of code – camille Mar 02 '19 at 15:55
  • Hi @camille I hope you can work now with the information I provided? Thank you so much!! – Stefan Christoph Mar 04 '19 at 08:13

0 Answers0