View source: R/data_modifiers.R
eeg_reference | R Documentation |
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.
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, implicit_ref = NULL, verbose = TRUE, ... ) ## S3 method for class 'eeg_epochs' eeg_reference( data, ref_chans = "average", exclude = NULL, robust = FALSE, implicit_ref = NULL, verbose = TRUE, ... ) reref_eeg(data, ...)
data |
Data to re-reference. Primarily meant for use with data of class
|
... |
Further parameters to be passed to |
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. Defaults to FALSE. |
implicit_ref |
Implicit reference channel - use this to add a channel back that was previously used as a reference. E.g. if the LM (left mastoid) channel was used in recording and is absent from the data, passing "LM" adds an "LM" channel back to the data, populated with zeroes. |
verbose |
Print informative messages in console. Defaults to TRUE. |
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_epochs
Matt Craddock matt@mattcraddock.com
# 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) eeg_reference(demo_spatial) eeg_reference(demo_spatial, ref_chans = "Fz") eeg_reference(demo_spatial, implicit_ref = "LM")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.