extract_xyt.Rdextract_xyt extracts the x, y, and t coordinates, i.e. time values, from a time-normalized mousetrap object. It basically is a wrap of the
extract_x, extract_y, and extract_t functions.
extract_xyt(
tn_data,
ID_column,
timestamps,
verbose = TRUE)A mousetrap object containing time-normalized data (commonly achieved using mousetrap::mt_time_normalize).
obsolete: Specify mousetrap instead. For now, tn_data remains useable. It will be depricated in due time. tn_data is the time-normalized mouse-tracking data. Can be extracted from the mousetrap object via df$tn_trajectories.
To maintain identification of individual trials, specify your ID variable. In older versions, this had to be part of tn_data.
Specify the number of timestamps you have used for time-normalizing.
If TRUE (which is the default), a progress bar is displayed.
A data frame.
x_key - Numbered x values per mouse-track ID.
x_value - The x coordinate value.
y_key - Numbered y values per mouse-track ID.
y_value - The y coordinate value.
t_key - Numbered t values per mouse-track ID.
t_value - The time value.
ID - Mouse-track IDs.
Kieslich, P. J., Henninger, F., Wulff, D. U., Haslbeck, J. M. B., & Schulte-Mecklenbeck, M. (2019). Mouse-tracking: A practical guide to implementation and analysis. In M. Schulte-Mecklenbeck, A. Kühberger, & J. G. Johnson (Eds.), A Handbook of Process Tracing Methods (pp. 111-130). New York, NY: Routledge.
xyt_data <- extract_xyt(mousetrap = mtqgam_mousetrap,
ID_column = "ID",
timestamps = 100,
verbose = FALSE)
head(xyt_data)
#> x_key x_value y_key y_value t_key t_value ID
#> 1 X1 1830 Y1 -428 T1 0 382
#> 2 X1 1576 Y1 -158 T1 0 427
#> 3 X1 1867 Y1 -204 T1 0 400
#> 4 X1 1668 Y1 -166 T1 0 411
#> 5 X1 1862 Y1 -170 T1 0 432
#> 6 X1 1867 Y1 -204 T1 0 400