Learn R Programming

PupilPre (version 0.6.3)

Preprocessing Pupil Size Data

Description

Pupillometric data collected using SR Research Eyelink eye trackers requires significant preprocessing. This package contains functions for preparing pupil dilation data for visualization and statistical analysis. Specifically, it provides a pipeline of functions which aid in data validation, the removal of blinks/artifacts, downsampling, and baselining, among others. Additionally, plotting functions for creating grand average and conditional average plots are provided. See the vignette for samples of the functionality. The package is designed for handling data collected with SR Research Eyelink eye trackers using Sample Reports created in SR Research Data Viewer.

Copy Link

Version

Install

install.packages('PupilPre')

Monthly Downloads

19

Version

0.6.3

License

GPL-3

Maintainer

Aki-Juhani Kyr<c3><b6>l<c3><a4>inen

Last Published

December 20th, 2025

Functions in PupilPre (0.6.3)

blink_summary

Check blinks
clean_blink

Automatically clean Eyelink marked blinks.
apply_butter

Applies a Butterworth filter to each event.
apply_user_cleanup

Applies manual cleanup to the data
apply_cleanup_change

Applies user-selected changes to auto cleanup
butter_filter_app

Plots the effect of Butterworth filtering by event.
baseline

Baseline correct the data
clean_artifact

Automatically clean artifacts.
check_baseline

Check baseline window for missing data
plot_compare_app

Plots comparison of Pupil and Pupil_Previous by event.
ppl_plot_avg_contour

Plots average contour surface of pupil data.
plot_summary_app

Plots summary of subject or item.
downsample

Downsample the data
ppl_check_eye_recording

Check which eyes were recorded during the experiment
ppl_plot_avg

Plots average Pupil.
ppl_plot_avg_cdiff

Plots average difference between two conditions.
compare_summary

A utility function to compare pupil size data before and after applying the cleanup
ppl_rm_extra_DVcols

Checks for and removes unnecessary DV output columns.
ppl_select_recorded_eye

Select the eye used during recording
verify_cleanup_app

Interactive app for verifying auto cleanup.
ppl_prep_data

Check the classes of specific columns and re-assigns as necessary.
plot_events

Plot each event within a group to a directory
user_cleanup_app

Interactive app for manually cleaning pupil data.
trim_filtered

Trim the beginning and end of filtered events.
recode_off_screen

Check for samples off-screen and marks as NA.
rm_sparse_events

Removes events with excessive missing data
interpolate_NAs

Interpolation for missing data.
Pupildat

This is a sample pupil size dataset included in the package
PupilPre

PupilPre: Preprocessing Pupil Size Data.
NA_summary

Check missing data
Pupilex1

This is an example dataset to illustrate certain functionality
Pupilex4

This is an example dataset to illustrate certain functionality
Pupilex3

This is an example dataset to illustrate certain functionality
Pupilex6

This is an example dataset to illustrate certain functionality
Pupilex2

This is an example dataset to illustrate certain functionality
Pupilex5

This is an example dataset to illustrate certain functionality
Pupilex7

This is an example dataset to illustrate certain functionality