eeg_rereference: Re-reference a channel or group of channels.

View source: R/channel_functions.R

eeg_rereferenceR Documentation

Re-reference a channel or group of channels.

Description

Re-reference a channel or group of channels.

Usage

eeg_rereference(.data, ..., .ref = NULL, na.rm = FALSE)

Arguments

.data

An eeg_lst object.

...

Channels to include. All the channels by default, but eye channels should be removed.

.ref

Channels that will be averaged as the reference. tidyselect compatible.

na.rm

a logical evaluating to TRUE or FALSE indicating whether NA values should be stripped before the computation proceeds.

Details

Notice that this function will also rereference the eye electrodes unless excluded. See examples.

Value

An eeg_lst with some channels re-referenced.

See Also

Other preprocessing functions: eeg_baseline(), eeg_downsample(), eeg_ica_keep(), eeg_ica(), eeg_segment(), filt

Examples

# Re-reference all channels using the left mastoid excluding the eye electrodes.
data_faces_ERPs_M1 <- data_faces_ERPs %>%
  eeg_rereference(-EOGV, -EOGH, .ref = M1)

# Re-reference using the linked mastoids excluding the eye electrodes.
data_faces_ERPs_M1M2 <- data_faces_ERPs %>%
  eeg_rereference(-EOGV, -EOGH, .ref = c(M1, M2))

bnicenboim/eeguana documentation built on March 16, 2024, 7:21 a.m.