This function is used to create an eeg_evoked object from eeg_epochs. By default, it will try to keep different conditions in the data separate using the epochs metadata from the object, thus yielding one average per condition. Alternatively, the user can specify which averages they want using the cols argument.

eeg_average(data, ...)

# S3 method for default
eeg_average(data, ...)

# S3 method for eeg_epochs
eeg_average(data, cols = NULL, ...)

# S3 method for eeg_evoked
eeg_average(data, cols = NULL, ...)

# S3 method for eeg_tfr
eeg_average(data, cols = NULL, ...)

Arguments

data

An eeg_epochs of eeg_tfr object.

...

Other arguments passed to the averaging functions

cols

Columns from the epochs structure that the average should group on. NULL, the default, uses all columns other than the epoch column.

Value

An object of class eeg_evoked if applied to eeg_epochs; eeg_tfr if applied to eeg_tfr.

Methods (by class)

  • default: Default method for averaging EEG objects

  • eeg_epochs: Create evoked data from eeg_epochs

  • eeg_evoked: average an eeg_epochs object over epochs.

  • eeg_tfr: average an eeg_tfr object over epochs.

Author

Matt Craddock matt@mattcraddock.com