extract_t extracts the t coordinates, i.e. time values, from a time-normalized mousetrap object.

extract_t(
  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.

  • key - Numbered values per mouse-track ID.

  • value - The time value.

  • ID - Mouse-track IDs.

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.

Author

D. Schmitz

Examples

t_data <- extract_t(mousetrap = mtqgam_mousetrap,
  ID_column = "ID",
  timestamps = 100,
  verbose = FALSE)

head(t_data)
#>   key value  ID
#> 1  T1     0 382
#> 2  T1     0 427
#> 3  T1     0 400
#> 4  T1     0 411
#> 5  T1     0 432
#> 6  T1     0 400