Re-reference a channel or group of channels.

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



An eeg_lst object.


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


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


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


An eeg_lst with some channels re-referenced.


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

See also

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


# 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))