View source: R/plot_difference.R
plot_difference | R Documentation |
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", ... )
data |
|
... |
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 |
conditions |
Defaults to "epoch_labels". |
Returns a ggplot2
plot object
eeg_epochs
: Plot an ERP difference wave from an eeg_epochs
object
Matt Craddock, matt@mattcraddock.com
plot_difference(demo_spatial, conditions = "epoch_labels", electrode = "P8")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.