Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

mousetrap R package with E-Prime data?

edited July 2021 in Mousetrap

Hello, I am a PhD student and am conducting my first mouse-tracking experiment. I am collecting data online with E-Prime, since mouse-tracking is not supported on OSWeb.

I was wondering if there is any way I can prepare my data to run analyses with the mousetrap R package?

I have seen that the mt_import_mousetrap() function's output is an array of "trajectories" linked to a df containing the rest of the data. Is there a way I can accomplish that by hand from my data? Would it work afterwards, or are there further considerations I am not aware of?

Here an example of how my data look right now:

Alternatively, are there any other packages that someone would recommend?

Thank you in advance for your help!

Carlotta

Comments

  • Hi Carlotta,

    the mousetrap R package offers different import functions depending on the format of the mouse-tracking data, so you should also be able to import your data and analyse it with mousetrap.

    Specifically, you first would have to read your data into R - I don't know how the EPrime files look like but I hope that there is an easy way to get them into R.

    The result of this will likely be a data.frame. This can then be imported into mousetrap. From your screenshot, I would guess that the mt_import_long function should work for your case (see documentation here: http://pascalkieslich.github.io/mousetrap/reference/mt_import_long.html).

    The command would likely look something like this:

    mt_data <- mt_import_long(raw_data, 
      xpos_label = "x", ypos_label = "y", timestamps_label = "t",
      mt_id_label = c("Subj", "Trial"),
      mt_seq_label = "step")
    

    Hope this helps!

    Best

    Pascal

  • Thank you so much Pascal, this worked beautifully!

    🙂

Sign In or Register to comment.