ERPscope: a new R package to visualize and analyze Event-Related Potential data (to be submitted)


A crucial step of scientific research is visualizing the data, which can be especially challenging with multidimensional EEG data. Several toolboxes exist to preprocess EEG data involving different platforms, but their plotting capacities are often limited, difficult to use, or difficult to customize. As many researchers already export their data to the R environment (R Core Team, 2017) in order to run statistical analyses, it would be best to also take full advantage of R’s plotting capabilities. Here we present ERPscope, a freely available R package that makes it easy to visualize, quantify, and statistically analyze ERP data. This user-friendly package allows the creation of ERP graphs and voltage maps with flexible and intuitive customization options. It offers a set of functions to plot ERP waves (plot_erp) and difference waves (plot_difference) for multiple individual electrodes or regions of interest. Both functions can add labels at specific time points (e.g. “target”), plot confidence intervals around the average waveform, indicate the baseline interval used in preprocessing, and apply alternative (simulated) baseline corrections to the data. Graph background, line colors, line types and thickness are easily adjustable for each ERP wave. It is also possible to display the results of a running t-test between two conditions at each electrode along with the ERP difference wave and to plot voltage maps for customized time windows. The function plot_cor_with_erp computes and plots the correlation between an ERP effect in a given time window and an external variable (e.g., performance data) for various scalp regions. Finally, using generate_ERP_stats_table, one can run the same statistical model across different time windows and create an easy-to-read table that highlights significant factors (optionally color-coded according to polarity). ERPscope is compatible with most existing data analysis pipelines. For further details and illustrations, please visit

Alexandre Herbay
Alexandre Herbay
Scientist & Developer

My work interests include data science, computer science, cognitive neuroscience and linguistics.