eeg.montage: Performs bipolar, reference or average EEG montage

View source: R/eeg.montage.R

eeg.montageR Documentation

Performs bipolar, reference or average EEG montage

Description

An EEG montage refers to the specific arrangement of EEG electrodes and the way their signals are displayed relative to each other during the interpretation of an electroencephalogram. The same EEG recording can look very different depending on the montage use. The function implements the three most frequently used montage methods in practice, i.e. 1) Bipolar Montage, 2) Referential (Monopolar) Montage and 3) Average Reference Montage.

Usage

eeg.montage(
  eeg.data,
  montage.type = c("average", "reference", "bipolar"),
  ref.channel = NULL,
  bipolar.pairs = NULL
)

Arguments

eeg.data

Must be a data frame: rows = samples, columns = channels.The data frame must have correct column names (channel names).

montage.type

A character string representing montage type.

  • "average" - each electrode is referenced to the average of all electrodes

  • "reference" - each active electrode is compared to a single common reference electrode

  • "bipolar" - each channel compares two adjacent electrodes

ref.channel

Name of the reference channel for "reference" montage.

bipolar.pairs

List of electrodes pairs for "bipolar" montage. See example below.

Details

To find out what names the individual channels have in the analysed EEG set, it is worth executing the read.edf.params() function.

Value

A data frame with final montage (rows = samples, columns = channels).

Examples

file <- system.file("extdata", "EEG.edf", package = "MatchingPursuit")
out <- read.edf.signals(file, resampling = FALSE, from = 0, to = 10)
signal <- out$signals

read.edf.params(file)

# The classical double banana montage.
pairs <- list(
  c("Fp2", "F4"),
  c("F4",  "C4"),
  c("C4",  "P4"),
  c("P4",  "O2"),
  c("Fp1", "F3"),
  c("F3",  "C3"),
  c("C3",  "P3"),
  c("P3",  "O1"),
  c("Fp2", "F8"),
  c("F8",  "T4"),
  c("T4",  "T6"),
  c("T6",  "O2"),
  c("Fp1", "F7"),
  c("F7",  "T3"),
  c("T3",  "T5"),
  c("T5",  "O1"),
  c("Fz",  "Cz"),
  c("Cz",  "Pz")
)

signal.bip.mont <- eeg.montage(signal, montage.type = c("bipolar"), bipolar.pairs = pairs)
signal.ref.mont <- eeg.montage(signal, montage.type = c("reference"), ref.channel = "O1")
signal.avg.mont <- eeg.montage(signal, montage.type = c("average"))

head(signal.bip.mont)
head(signal.ref.mont)
head(signal.avg.mont)


MatchingPursuit documentation built on April 9, 2026, 9:08 a.m.