extract_xyt: Extract x, y, and t coordinates of time-normalized...

View source: R/extract_xyt.R

extract_xytR Documentation

Extract x, y, and t coordinates of time-normalized mouse-tracking data

Description

extract_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.

Usage

extract_xyt(
  tn_data,
  ID_column,
  timestamps,
  verbose = TRUE)

Arguments

mousetrap

A mousetrap object containing time-normalized data (commonly achieved using mousetrap::mt_time_normalize).

tn_data

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.

ID_column

To maintain identification of individual trials, specify your ID variable. In older versions, this had to be part of tn_data.

timestamps

Specify the number of timestamps you have used for time-normalizing.

verbose

If TRUE (which is the default), a progress bar is displayed.

Value

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.

Author(s)

D. Schmitz

References

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.

Examples

xyt_data <- extract_xyt(mousetrap = mtqgam_mousetrap,
  ID_column = "ID",
  timestamps = 100,
  verbose = FALSE)

head(xyt_data)


dosc91/mtqgam documentation built on Sept. 29, 2023, 9:38 a.m.