min_time and max_timeR/extract_movement_functions.R
extract_pupil.RdYou can supply timestamps to min_time and max_time (e.g timestamp of
begin escape) to average over only a period.
A movement or eyetracker data frame. Expected columns are either
eye_openness_left, eye_openness_right, pupil_diameter_left and pupil_diameter_right
minimum time in s (default: trial start)
maximum time in s (default: trial end)
One of the strings "mean" "max" or "min". Specifies statistic (default is mean)
One of the strings "best", "combined", "left" or "right". (default is best)
Openness of eye required to include measurement. (default is 0.55)
Difference in NA proportions between left and right eye tolerated in combination = combined.
A statistic (mean, min, max) from pupil diameter as specified in method. numeric
Data contains pupil diameters of the left and right eyes. So data to be used specified in
the combination parameter. Default is "best" and this utilizes the pupil measurements of the eye
with fewer NA. Setting combination to "combined" causes it to take the average.
"left" or "right" can be specified as well
In "combined" mode, if the proportion of NAs found in the left and right eyes differ by na_proportion_tolerance
(Default is 0.1 i.e 10%) then a warning is generated and combination defaults to best