,Skip to contents

About

eeguana eeguana-package
eeguana: Flexible Manipulation of EEG Data

Reading and writing functions

Functions for reading external files and return an eeg_lst.

read_edf()
Read an edf/edf+/bdf file into R
read_fif()
Read a FIF file into R
read_ft()
Read a Fieldtrip file into R
read_set()
Read EEGlab set files (Matlab files) into R
read_vhdr()
Read a BrainVision file into R
write_vhdr()
Write an eeg_lst object to BrainVision file(s) (experimental)

Tidyverse verbs (and extensions)

Functions that overload some tidyverse functions and always return an eeg_lst.

Specialized summarizing functions

Functions that return useful summaries.

count_complete_cases_tbl()
Count number of complete segments of an eeg_lst object.
eeg_ica_cor_tbl()
Show correlations between ICA sources and eye (EOG) electrodes.
eeg_ica_summary_tbl()
Show a table with a summary of the results of the ICA.
eeg_ica_var_tbl()
Show the variance explained for each ICA sources.
channel_names() channel_ica_names() nchannels() component_names() ncomponents() sampling_rate() nsamples()
Display information of the eeg_lst object.
summary(<eeg_lst>)
Summary of eeg_lst information.

EEG-specialized functions

Functions for applying specialized actions on the signal table, channel, or the entire eeg_lst.

eeg_artif_minmax() eeg_artif_step() eeg_artif_amplitude() eeg_artif_peak()
Detect artifacts and add them in the events table of an eeg_lst
eeg_events_to_NA()
Remove (transform to NA) problematic events from the signal table of an eeg_lst.
eeg_ica()
EEG signal decomposition using Independent Component Analysis (ICA)
eeg_ica_cor_tbl()
Show correlations between ICA sources and eye (EOG) electrodes.
eeg_ica_keep()
Select independent components (or sources) to keep.
eeg_ica_show()
Add independent components (or sources) to the signal table for visualization.
eeg_ica_summary_tbl()
Show a table with a summary of the results of the ICA.
eeg_ica_var_tbl()
Show the variance explained for each ICA sources.
eeg_baseline()
Baseline an eeg_lst
eeg_downsample()
Downsample EEG data
eeg_rereference()
Re-reference a channel or group of channels.
eeg_segment() eeg_unsegment()
Segment (and unsegment) an eeg_lst.
eeg_filt_low_pass() eeg_filt_high_pass() eeg_filt_band_pass() eeg_filt_band_stop()
Apply a zero-phase low-pass, high-pass, band-pass, or band-stop FIR or IIR filter.
chs_fun()
Get the by-sample (or by-row) function of the specified channels.
chs_mean()
Get the by-sample (or by-row) mean of the specified channels.
eeg_power_band()
Compute power bands.
eeg_psd()
Compute the power spectral density (PSD) of an EEG signal.

Plot functions

Wrappers to ggplot functions that first transform the eeg_lst to a wide tibble, together with some transformation (downsampling, interpolation, etc).

ggplot(<eeg_lst>)
Create an ERP plot
plot(<eeg_lst>) plot(<psd_lst>)
Create a basic signal plot
plot_components()
Generates topographic plots of the components after running ICA on an eeg_lst
plot_in_layout()
Arrange ERP plots according to scalp layout
plot_topo()
Create a topographic plot
annotate_electrodes()
Adds the electrode labels to a head shape
annotate_events()
Adds a layer with the events on top of a plot of an eeg_lst.
annotate_head()
Add a head shape to a ggplot
theme_eeguana() theme_eeguana2() default_theme()
Eeguana ggplot themes
eeg_browse()
Browse the signal or the ICA components interactively

‘base’-inspired functions

Functions for getting specific information about the objects that compose an eeg_lst.

as_channel_dbl()
Coerce a vector of real (double) numbers into a channel object
as_eeg_lst()
Transforms an object to a eeg_lst
as_sample_int()
Convert a time point into a sample.
as_tibble.eeg_lst() as_data_frame.eeg_lst() as_long_tbl(<eeg_lst>)
Convert an eeg_lst to a long table in tibble format.
as_tibble.psd_lst()
Convert an psd_lst to a long table in tibble format.
as_tidytable.eeg_lst()
Convert an eeg_lst to a long table in tidytable format.
as_tidytable.psd_lst()
Convert an psd_lst to a long table in tidytable format.
as_time()
Convert a sample point into a time point.
as.data.frame(<eeg_lst>)
Convert an eeg_lst to a (base) data frame.
as.data.frame(<psd_lst>)
Convert a psd_lst to a (base) data frame.
as.data.table.eeg_lst()
Convert an eeg_lst to a long table in data.table format.
as.data.table.psd_lst()
Convert a psd_lst list to a long table in data.table format.
is_channel_dbl()
Test if the object is a channel or EOG channel
is_component_dbl()
Test if the object is a component This function returns TRUE for components.
is_eeg_lst()
Test if the object is an eeg_lst.
is_events_tbl()
Test if the object is an events_tbl This function returns TRUE for events_tbl.
is_psd_lst()
Test if the object is a psd_lst.
is_psd_tbl()
Test if the object is a psd_tbl
is_sample_int()
Test if the object is a sample This function returns TRUE for samples.
is_signal_tbl()
Test if the object is a signal_tbl
na_omit()
Handle Missing Values in eeg_lst objects
channel_names() channel_ica_names() nchannels() component_names() ncomponents() sampling_rate() nsamples()
Display information of the eeg_lst object.
ica_matrix_lst()
Function to get the list of mixing and unmixing matrices of an eeg_ica_lst object.
print(<eeg_lst>) print(<psd_lst>) print(<eeg_ica_lst>)
Print an eeg_lst

Editing functions

Functions for showing (and sometimes editing) eeg_lst objects parts.

signal_tbl()
Function to get the signal table of an eeg_lst object.
events_tbl() `events_tbl<-`()
Functions to get or set the events table of an eeg_lst object.
segments_tbl()
Function to get the segments table of an eeg_lst object.
channels_tbl() `channels_tbl<-`()
Functions to get or set the channel information of an eeg_lst object.

Constructor functions

Functions for creating objects.

eeg_lst()
Create an eeg_lst
psd_lst()
Creates a psd_lst.
sample_int()
Builds a series of sample numbers.
channel_dbl()
Builds a channel.
component_dbl()
Builds a component.

Others

Some other useful functions.

eeg_interpolate_tbl()
Create a table with interpolated signals of an eeg_lst object.
change_coord()
Change coordinate system from 3D to 2D
rpink()
Generates pink noise
adapt_fast_ICA() fast_ICA2()
Wrapper for FastICA methods for Independent Component Analysis from fICA package
fast_ICA()
Wrapper for FastICA method for Independent Component Analysis from fastICA package
ica_matrix_lst()
Function to get the list of mixing and unmixing matrices of an eeg_ica_lst object.
between
Convenience function for range subsets
install_py_eeguana()
Install the Python packages needed for eeguana

Example data sets

Example data sets in eeg_lst format.

data_faces_10_trials
EEGs elicited when one subject saw faces and non-faces objects.
data_faces_ERPs
ERPs elicited when one subject saw faces and non-faces objects.

Layouts

Layout of caps

layout_32_1020
Layout for a 32 electrodes cap at the standard 10-20 system

Signal processing

Miscellanous signal processing functions (mostly adapted from python and matlab)

sig_fft()
Compute the one-dimensional discrete Fourier Transform.
sig_ifft()
Compute the one-dimensional inverse discrete Fourier Transform.