eeg_average: Calculate averages (e.g. ERPs) for single datasets

View source: R/data_averaging.R

eeg_averageR Documentation

Calculate averages (e.g. ERPs) for single datasets

Description

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.

Usage

eeg_average(data, ...)

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

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

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

## S3 method for class '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(s)

Matt Craddock matt@mattcraddock.com


neuroconductor/eegUtils documentation built on Feb. 3, 2023, 5:33 p.m.