Calculates the difference between the event-related potentials from two conditions and plots it.
Usage
plot_difference(data, ...)
# S3 method for class 'eeg_epochs'
plot_difference(
data,
electrode = NULL,
time_lim = NULL,
baseline = NULL,
colour = NULL,
color = NULL,
mapping = NULL,
conditions = "epoch_labels",
...
)
Arguments
- data
eegUtils
object. Should have multiple timepoints.- ...
Other arguments passed to methods.
- electrode
Electrode(s) to plot.
- time_lim
Character vector. Numbers in whatever time unit is used specifying beginning and end of time-range to plot. e.g. c(-.1, .3)
- baseline
Character vector. Times to use as a baseline. Takes the mean over the specified period and subtracts. e.g. c(-.1,0)
- colour
Variable to colour lines by. If no variable is passed, only one line is drawn.
- color
Alias for colour.
- mapping
A ggplot2
aes()
mapping.- conditions
Defaults to "epoch_labels".
Methods (by class)
plot_difference(eeg_epochs)
: Plot an ERP difference wave from aneeg_epochs
object
Author
Matt Craddock, matt@mattcraddock.com