Analyze Sampling Rates (Trial and Subject Levels, with Histogram)
Description
Computes sampling rate for each trial (subject × trial) and summarizes at the subject level. Uses distinct timepoints to avoid duplicate time values. Plots histogram of subject-level sampling rates.
Usage
analyze_sampling_rate(eye_data, summary_stat = "Median")
Arguments
eye_data
|
A dataframe with subject, trial, time columns. |
summary_stat
|
Either "median" (default) or "mean". |
Value
A tibble with subject, trial, SR_trial, SR_subject