Description Usage Arguments Value Methods (by class) Author(s) Examples
View source: R/data_modifiers.R
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.
1 2 3 4 5 6 7 8 9 10 11 12 | eeg_reference(data, ...)
## Default S3 method:
eeg_reference(data, ...)
## S3 method for class 'eeg_data'
eeg_reference(data, ref_chans = "average", exclude = NULL, robust = FALSE, ...)
## S3 method for class 'eeg_epochs'
eeg_reference(data, ref_chans = "average", exclude = NULL, robust = FALSE, ...)
reref_eeg(data, ...)
|
data |
Data to re-reference. Primarily meant for use with data of class
|
... |
Further parameters to be passed to eeg_reference |
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. |
object of class eeg_data
, re-referenced as requested.
default
: Default method
eeg_data
: Rereference objects of class eeg_data
eeg_epochs
: Rereference objects of class eeg_data
Matt Craddock matt@mattcraddock.com
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
eeg_reference(demo_epochs, exclude = "B5")
# Reference data using the median of the reference channels rather than the mean
eeg_reference(demo_epochs, robust = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.