Compute Gaze Dispersion
Description
Calculates centroid anddispersion from gaze data.
Usage
gaze_dispersion(data, x, y, grouping_vars)
Arguments
data
|
A data frame or tibble. |
x
|
A string: name of the column with X gaze coordinates. |
y
|
A string: name of the column with Y gaze coordinates. |
grouping_vars
|
A character vector of column names to group by (e.g., subject, condition, trial). |
Value
A tibble with centroid_x, centroid_y, dispersion, and log_dispersion for each group.