View source: R/fixation_dispersion.R
fixation_dispersion | R Documentation |
Detects fixations by assessing dispersion of the eye position, using a method that is similar to that proposed by Salvucci & Goldberg (1996). Evaluates the maximum dispersion (distance) between x/y coordinates across a window of data. Looks for sufficient periods in which this maximum dispersion is below the specified dispersion tolerance. NAs are considered breaks in the data and are not permitted within a valid fixation period.
fixation_dispersion(
data,
min_dur = 150,
disp_tol = 100,
NA_tol = 0.25,
progress = TRUE,
participant_ID = "participant_ID"
)
data |
A dataframe with raw data (time, x, y, trial) for one participant (the standardised raw data form for eyetools) |
min_dur |
Minimum duration (in milliseconds) of period over which fixations are assessed |
disp_tol |
Maximum tolerance (in pixels) for the dispersion of values allowed over fixation period |
NA_tol |
the proportion of NAs tolerated within any window of samples that is evaluated as a fixation |
progress |
Display a progress bar |
participant_ID |
the variable that determines the participant identifier. If no column present, assumes a single participant |
It can take either single participant data or multiple participants where there is a variable for unique participant identification.
The function looks for an identifier named participant_ID
by default and will treat this as multiple-participant data as default,
if not it is handled as single participant data, or the participant_ID needs to be specified
a dataframe containing each detected fixation by trial, with mean x/y position in pixel, start and end times, and duration.
Salvucci, D. D., & Goldberg, J. H. (2000). Identifying fixations and saccades in eye-tracking protocols. Proceedings of the Symposium on Eye Tracking Research & Applications - ETRA '00, 71–78.
data <- combine_eyes(HCL)
fixation_dispersion(data, participant_ID = "pNum")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.