calculate_mean_pupil_size: Calculate a mean size across two pupils over time

View source: R/calculate_mean_pupil_size.R

calculate_mean_pupil_sizeR Documentation

Calculate a mean size across two pupils over time

Description

This function is useful when you have left and right eye eyetracking data, and a mean of the two would be useful.

Usage

calculate_mean_pupil_size(data, pupil1, pupil2)

Arguments

data

a PupillometryR dataframe

pupil1

column name indicating pupil size

pupil2

column name indicating pupil size

Value

A PupillometryR dataframe with a mean pupil column

Examples

Sdata <- make_pupillometryr_data(data = pupil_data,
                               subject = ID,
                               trial = Trial,
                               time = Time,
                               condition = Type)
regressed_data <- regress_data(data = Sdata, pupil1 = RPupil, pupil2 = LPupil)
mean_data <- calculate_mean_pupil_size(data = regressed_data, pupil1 = RPupil, pupil2 = LPupil)

PupillometryR documentation built on Sept. 15, 2023, 5:13 p.m.