PupillometryR (version 0.0.1)

calculate_mean_pupil_size: 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

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataCamp Workspace