Blog

Analyzing the Experiment

In order to analyze the data with R Studio, please install the following libraries. R-Code is displayed bold.

library(mousetrack)
library(mousetrap)
library(ssMousetrack)
library(ggplot2)
library(readbulk)
library(dplyr)
library(foreign)

 

Importing of the files:

mt_data_raw <- read_bulk(extension=“.txt“)
rawdata <- mt_import_wide(mt_data_raw)

 

Remapping choices to left/right

mydata<-mt_remap_symmetric(rawdata, use = „trajectories“, save_as = „trajectories“,
dimensions = c(„xpos“, „ypos“), remap_xpos = „left“,
remap_ypos = „up“)

 

Calculating measures like area under the curve

mydata2<-mt_measures(mydata, use = „trajectories“, save_as = „measures“,
dimensions = c(„xpos“, „ypos“), timestamps = „timestamps“,
flip_threshold = 0, hover_threshold = NULL, verbose = FALSE)

 

Plotting all trajectories

mt_plot(rawdata)

 

Alligning all start points

mydata<- mt_align_start(mydata)

 

For a full list of other commands please see Pascal Kieslich’s page.