Calculates the difference between the event-related potentials from two conditions and plots it.
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",
...
)
eegUtils
object. Should have multiple timepoints.
Other arguments passed to methods.
Electrode(s) to plot.
Character vector. Numbers in whatever time unit is used specifying beginning and end of time-range to plot. e.g. c(-.1, .3)
Character vector. Times to use as a baseline. Takes the mean over the specified period and subtracts. e.g. c(-.1,0)
Variable to colour lines by. If no variable is passed, only one line is drawn.
Alias for colour.
A ggplot2 aes()
mapping.
Defaults to "epoch_labels".
Returns a ggplot2
plot object
plot_difference(eeg_epochs)
: Plot an ERP difference wave from an eeg_epochs
object
plot_difference(demo_spatial, conditions = "epoch_labels", electrode = "P8")
#> Creating epochs based on combinations of variables: participant_id epoch_labels