Extract saccades using an algorithm proposed by Engbert and Kliegl (2003) tools:::Rd_expr_doi("10.1016/S0042-6989(03)00084-1")
method_ek(x, y, vel, acc, sample_rate, trial, options)logical vector marking samples that belong to saccades
Gaze x coordinate, _arbitrary units_ as threshold velocity is computed in units of standard deviation.
Gaze x coordinate, _arbitrary units_ as threshold velocity is computed in units of standard deviation.
Velocity data.frame with columns x, y, amp.
Acceleration data.frame with columns x, y, amp.
Sample rate in Hz.
Trial id, so that trial borders are respected when computing velocity and saccades.
Named list with method options. See details for further information.
Method options, please refer to Engbert and Kliegl (2003) for details on parameters and the rationale for default values.
ek_velocity_threshold Velocity threshold for saccade detection in standard deviations. Defaults to 6.
ek_sd_fun Function used to compute standard deviation for velocities. Defaults to sd_via_median_estimator, as per formula #2 in Engbert and Kliegl (2003). Can be replaced with mad, sd, etc.
ek_minimal_duration_ms Minimal duration of a saccade in milliseconds. Defaults to 12.
ek_minimal_separation_ms A minimal required time gap between saccades. Defaults to 12.
extract_saccades
# Do not run this function directly, use extract_saccades() instead
Run the code above in your browser using DataLab