bin_pupil | R Documentation |
This function bins pupil data into specified time bins using either mean or median aggregation. It creates evenly spaced bins across the time series and aggregates pupil values within each bin.
bin_pupil(x, prev_op, bins_per_second, method, current_fs)
x |
A data frame containing the pupil time series data |
prev_op |
The name of the previous operation's output column |
bins_per_second |
Number of bins per second (positive integer) |
method |
Aggregation method: "mean" or "median" |
current_fs |
Current sampling rate in Hz |
This function is called by the exposed wrapper bin()
.
A data frame with binned pupil data containing columns:
time_secs
: Bin center timestamps
pupil_binned_{method}_{bins_per_second}hz
: Binned pupil values
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.