| PupilPre {PupilPre} | R Documentation |
PupilPre: Preprocessing Pupil Size Data.
Description
The PupilPre package provides a set of functions for preparing pupil size data collected with SR Research Eyelink eye trackers.
Processing functions
The function
ppl_prep_datareturns a data table with correctly assigned classes for important columns.The function
ppl_select_recorded_eyereturns a data table with data from the the recorded eye in new columns (IA_ID and IA_LABEL).The function
recode_off_screenrecodes samples with NA if gaze coordinates indicate that the sample was taken while the pupil was off-screen.The function
ppl_rm_extra_DVcolsremoves DataViewer coumns that are not necessary for preprocessing with this package.The function
clean_blinkreturns a data table for which blinks have been removed based on the parameters provided.The function
clean_artifactreturns a data table for which artifacts have been removed based on the parameters provided.The function
apply_cleanup_changeapplies user-selected changes to the automatic cleanup.The function
apply_user_cleanupreturns a data table for which the manually selected artifacts have been removed.The function
rm_sparse_eventsremoves events that do not contain enough data in the baseline and/or critical windows, as specified by the user.The function
interpolate_NAsreturns a data table in which NAs have been replaced using linear interpolation.The function
apply_butterapplies a Butterworth filter to the pupil size data.The function
trim_filteredremoves a specified number of milliseconds from the beginning and the end of each filtered event, as to remove artifacts created by the filter.The function
downsamplereturns a data table for which the data have been downsampled using the specified sampling rate.The function
baselinereturns a data table for which the pupil data have been baselined using the specified method.
Utility functions
The function
ppl_check_eye_recordingreturns a summary of whether or not the dataset contains gaze data in both the Right and Left interest area columns.The function
blink_summaryreturns a summary of Eyelink marked blinks by Event, Subject, or Item.The function
NA_summaryreturns a summary of missing data by Event, Subject, or Item.The function
check_baselineexamines the data within a specified baseline window.The function
compare_summaryreturns a summary of comparison between the columns Pupil and Pupil_Previous.
Plotting functions
The function
ppl_plot_avgreturns a plot of the grand or conditional averages of pupil dilation along with error bars.The function
ppl_plot_avg_contourreturns a contour plot of the conditional average of pupil dilation over Time and a specified continuous variable.The function
ppl_plot_avg_cdiffreturns a plot of the average difference between two conditions for pupil dilation with error bars.The function
plot_eventsreturns image files containing plots for each event by a group and saves into a specified directory.
Interactive functions
The function
user_cleanup_appopens a Shiny app for identifying and marking datapoints associated with artifacts.The function
plot_summary_appopens a Shiny app for inspecting by-subject or by-item averages within a specified time window.The function
plot_compare_appopens a Shiny app for inspecting events for comparing the current pupil column to the previous pupil column.The function
verify_cleanup_appplots the data points changed during the previously completed auto cleanup, allowing the user to reject the cleanup for specific events.The function
butter_filter_appproduces a plot of filtered pupil data over the original data to visually inspect the effect of different filter settings.
Notes
The vignettes are available via
browseVignettes(package = "PupilPre").A list of all available functions is provided in
help(package = "PupilPre").This package can be cited using the information obtained from
citation("PupilPre") or print(citation("PupilPre"), bibtex = TRUE)
Author(s)
Aki-Juhani Kyröläinen, Vincent Porretta, Jacolien van Rij, Juhani Järvikivi
Maintainer: Aki-Juhani Kyröläinen, (akkyro@gmail.com)
McMaster University, Canada