`R/calculate_mean_pupil_size.R`

`calculate_mean_pupil_size.Rd`

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

`calculate_mean_pupil_size(data, pupil1, pupil2)`

- data
a PupillometryR dataframe

- pupil1
column name indicating pupil size

- pupil2
column name indicating pupil size

A PupillometryR dataframe with a mean pupil column

```
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)
```