reref_eeg: Referencing

Description Usage Arguments Value Methods (by class) Author(s) Examples

View source: R/data_modifiers.R

Description

Used to reference the EEG data to a specified electrode or electrodes. Defaults to average reference. When specific electrodes are used, they are removed from the data. Meta-data about the referencing scheme is held in the eeg_data structure.

Usage

1
2
3
4
5
6
7
8
reref_eeg(data, ...)

## Default S3 method:
reref_eeg(data, ...)

## S3 method for class 'eeg_data'
reref_eeg(data, ref_chans = "average",
  exclude = NULL, robust = FALSE, ...)

Arguments

data

Data to re-reference. Primarily meant for use with data of class eeg_data.

...

Further parameters to be passed to reref_eeg

ref_chans

Channels to reference data to. Defaults to "average" i.e. average of all electrodes in data. Character vector of channel names or numbers.

exclude

Electrodes to exclude from average reference calculation.

robust

Use median instead of mean; only used for average reference.

Value

object of class eeg_data, re-referenced as requested.

Methods (by class)

Author(s)

Matt Craddock [email protected]

Examples

1
2
3
4
5
6
# demo_epochs is average referenced by default
demo_epochs
# Rereference it but exclude B5 from calculation of the average
reref_eeg(demo_epochs, exclude = "B5")
# Reference data using the median of the reference channels rather than the mean
reref_eeg(demo_epochs, robust = TRUE)

craddm/eegUtils documentation built on Dec. 12, 2018, 12:36 a.m.