Combine multiple eeg_epochs, eeg_data, or eeg_evoked objects into a single object. The function will try to check the participant_id entry in the epochs structure to see if the data comes from a single participant or from multiple participants. If the data is from a single participant, it will concatenate the objects and attempt to correct them so that the trial numbers and timings are correct.

eeg_combine(data, ...)

# S3 method for list
eeg_combine(data, ...)

# S3 method for eeg_data
eeg_combine(data, ..., check_timings = TRUE)

# S3 method for eeg_epochs
eeg_combine(data, ..., check_timings = TRUE)

# S3 method for eeg_evoked
eeg_combine(data, ...)

Arguments

data

An eeg_data, eeg_epochs, or eeg_evoked object, or a list of such objects.

...

additional eeg_data or eeg_epochs objects

check_timings

Check whether sample times / epoch numbers are continuously ascending; if not, modify so that they are. Useful when, for example, combining epochs derived from multiple recording blocks. Defaults to TRUE

Value

If all objects have the same participant_id, returns an object of the same class as the original input object. If the objects have different participant_id numbers, an object of both class eeg_group and the same class as the original input object.

Methods (by class)

  • list: Method for combining lists of eeg_data and eeg_epochs objects.

  • eeg_data: Method for combining eeg_data objects.

  • eeg_epochs: Method for combining eeg_epochs objects

  • eeg_evoked: Method for combining eeg_evoked objects

Author

Matt Craddock, matt@mattcraddock.com