Package: PupilPre 0.6.3

PupilPre: Preprocessing Pupil Size Data

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.

Authors:Aki-Juhani Kyröläinen [aut, cre], Vincent Porretta [aut], Jacolien van Rij [ctb], Juhani Järvikivi [ctb]

PupilPre_0.6.3.tar.gz
PupilPre_0.6.3.zip(r-4.7)PupilPre_0.6.3.zip(r-4.6)PupilPre_0.6.3.zip(r-4.5)
PupilPre_0.6.3.tgz(r-4.6-any)PupilPre_0.6.3.tgz(r-4.5-any)
PupilPre_0.6.3.tar.gz(r-4.7-any)PupilPre_0.6.3.tar.gz(r-4.6-any)
PupilPre_0.6.3.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
PupilPre/json (API)

# Install 'PupilPre' in R:
install.packages('PupilPre', repos = c('https://akkyro.r-universe.dev', 'https://cloud.r-project.org'))
Datasets:
  • Pupildat - This is a sample pupil size dataset included in the package
  • Pupilex1 - This is an example dataset to illustrate certain functionality
  • Pupilex2 - This is an example dataset to illustrate certain functionality
  • Pupilex3 - This is an example dataset to illustrate certain functionality
  • Pupilex4 - This is an example dataset to illustrate certain functionality
  • Pupilex5 - This is an example dataset to illustrate certain functionality
  • Pupilex6 - This is an example dataset to illustrate certain functionality
  • Pupilex7 - This is an example dataset to illustrate certain functionality

On CRAN:

Conda:

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

3.13 score 27 scripts 233 downloads 28 exports 62 dependencies

Last updated from:fce5e088ec. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK157
source / vignettesOK247
linux-release-x86_64OK132
macos-release-arm64OK136
macos-oldrel-arm64OK214
windows-develOK128
windows-releaseOK126
windows-oldrelOK103
wasm-releaseOK114

Exports:apply_butterapply_cleanup_changeapply_user_cleanupbaselineblink_summarybutter_filter_appcheck_baselineclean_artifactclean_blinkcompare_summarydownsampleinterpolate_NAsNA_summaryplot_compare_appplot_eventsplot_summary_appppl_check_eye_recordingppl_plot_avgppl_plot_avg_cdiffppl_plot_avg_contourppl_prep_datappl_rm_extra_DVcolsppl_select_recorded_eyerecode_off_screenrm_sparse_eventstrim_filtereduser_cleanup_appverify_cleanup_app

Dependencies:base64encbslibcachemclicommonmarkcpp11DEoptimRdigestdplyrfarverfastmapfontawesomefsgenericsggplot2gluegtablehtmltoolshttpuvisobandjquerylibjsonlitelabelinglaterlatticelifecyclemagrittrMASSMatrixmemoisemgcvmimenlmeotelpillarpkgconfigpromisespurrrR6rappdirsRColorBrewerRcpprlangrobustbaseS7sassscalesshinysignalsourcetoolsstringistringrtibbletidyrtidyselectutf8vctrsviridisLiteVWPrewithrxtablezoo

Basic Preprocessing of Pupil Size Data
Before using PupilPre | Loading the package and the data | Preparing the data | Verifying and creating necessary columns | Remove unnecessary columns | Creating the Time series column | Selecting which eye to use | Off-screen data | Check for blinks and missing data | Blink and artifact cleanup | Automatic cleanup | Marked blinks | Unmarked artifacts | Manual cleanup | Plot events | Removing events with sparse data | Interpolation and filtering | Baseline | Downsample the data | Saving the data | Plotting

Last update: 2025-12-20
Started: 2019-08-06

Interpolation and Filtering of Pupil Size Data
Interpolation | Linear | Splines | Filtering | Determining the parameters | Applying the filter | Trimming the data | Proceed with preprocessing

Last update: 2025-12-20
Started: 2019-08-06

Plotting Pupil Size Data Processed with PupilPre
Plotting the data | Averaged data | Conditional averages | Error bars and Error bands | Confidence intervals (pointwise/simultaneous) | Calculation of averages - Mean vs. Grand mean | Difference plots | Conditional contour surface | Extracting plotting data | Event plotting | Interactive/Utility plotting apps | Shiny app plots for data inspection

Last update: 2025-12-20
Started: 2019-08-06

Aligning Data to a Specific Sample Message
Before aligning | Aligning to a specific message | Creating the Time series column | Proceed with preprocessing

Last update: 2019-08-06
Started: 2019-08-06

Blink and Artifact Cleanup (Detailed)
Automatic cleanup | Marked blinks | Verifying the cleanup | Unmarked artifacts | Verifying the cleanup, part II | Further evaluation of the cleanup | Manual cleanup | Proceed with preprocessing

Last update: 2019-08-06
Started: 2019-08-06

Readme and manuals

Help Manual

Help pageTopics
Applies a Butterworth filter to each event.apply_butter
Applies user-selected changes to auto cleanupapply_cleanup_change
Applies manual cleanup to the dataapply_user_cleanup
Baseline correct the databaseline
Check blinksblink_summary
Plots the effect of Butterworth filtering by event.butter_filter_app
Check baseline window for missing datacheck_baseline
Automatically clean artifacts.clean_artifact
Automatically clean Eyelink marked blinks.clean_blink
A utility function to compare pupil size data before and after applying the cleanupcompare_summary
Downsample the datadownsample
Interpolation for missing data.interpolate_NAs
Check missing dataNA_summary
Plots comparison of Pupil and Pupil_Previous by event.plot_compare_app
Plot each event within a group to a directoryplot_events
Plots summary of subject or item.plot_summary_app
Check which eyes were recorded during the experimentppl_check_eye_recording
Plots average Pupil.ppl_plot_avg
Plots average difference between two conditions.ppl_plot_avg_cdiff
Plots average contour surface of pupil data.ppl_plot_avg_contour
Check the classes of specific columns and re-assigns as necessary.ppl_prep_data
Checks for and removes unnecessary DV output columns.ppl_rm_extra_DVcols
Select the eye used during recordingppl_select_recorded_eye
This is a sample pupil size dataset included in the packagePupildat
This is an example dataset to illustrate certain functionalityPupilex1
This is an example dataset to illustrate certain functionalityPupilex2
This is an example dataset to illustrate certain functionalityPupilex3
This is an example dataset to illustrate certain functionalityPupilex4
This is an example dataset to illustrate certain functionalityPupilex5
This is an example dataset to illustrate certain functionalityPupilex6
This is an example dataset to illustrate certain functionalityPupilex7
PupilPre: Preprocessing Pupil Size Data.PupilPre _PACKAGE
Check for samples off-screen and marks as NA.recode_off_screen
Removes events with excessive missing datarm_sparse_events
Trim the beginning and end of filtered events.trim_filtered
Interactive app for manually cleaning pupil data.user_cleanup_app
Interactive app for verifying auto cleanup.verify_cleanup_app