read_mousetracker imports data that was collected using MouseTacker
(Freeman & Ambady, 2010) and exported to a .csv file through
MouseTracker Analyzer. It focuses on the raw data, and provides several
options to remove pre-processed aggregate data (see Details).
read_mousetracker(file, remove_mean_data = TRUE, last_lines_to_rm = 0, remove_empty_columns = TRUE)remove_mean_data. The removal of the last lines is performed after
the optional removal of the auto-detected mean data.read_mousetracker provides several ways of removing them.Data that stem from a "time normalized analysis" in MouseTracker Analyzer,
can be read into R using read_mousetracker with default arguments (the
aggregated trajectory data are automatically detected and removed, as they
are marked by a row labeled "MEAN SUBJECT-BY-SUBJECT DATA" in the .csv
file).
Data that stem from a "raw time analysis" in MouseTracker Analyzer, also
usually contain the aggregated trajectory data. However, as they are not
marked by a specific row label in the .csv file, the number of last
lines that should be omitted has to be specified explicitly using the
argument last_lines_to_rm. Typically, this number is two times the
number of data files.
After reading the data into R, mt_import_wide can be used to prepare the trajectory data for analyses using the mousetrap library.
The current version of read_mousetracker has been tested with data
exported from MouseTracker Version 2.82.
## Not run:
# # Data from "time normalized analysis" in MouseTracker
# raw_data <- read_mousetracker("tn_data_exported.csv")
#
# # Data from "raw time analysis" in MouseTracker
# raw_data <- read_mousetracker("raw_data_exported.csv",last_lines_to_rm=2*8)
# ## End(Not run)
Run the code above in your browser using DataLab