Plot an ERP image from a single electrode. Uses a boxcar smooth over a series of trials in order to make across-trial patterns more apparent.
erp_image(data, ...)
# S3 method for class 'data.frame'
erp_image(
data,
electrode = "Cz",
time_lim = NULL,
smoothing = 10,
clim = NULL,
interpolate = FALSE,
na.rm = TRUE,
...
)
# S3 method for class 'eeg_epochs'
erp_image(
data,
electrode = "Cz",
time_lim = NULL,
smoothing = 10,
clim = NULL,
interpolate = FALSE,
na.rm = TRUE,
...
)
# S3 method for class 'eeg_ICA'
erp_image(
data,
component = "Comp001",
smoothing = 10,
clim = NULL,
interpolate = FALSE,
na.rm = TRUE,
...
)
# S3 method for class 'eeg_tfr'
erp_image(
data,
electrode = "Cz",
time_lim = NULL,
smoothing = 10,
clim = NULL,
interpolate = FALSE,
freq_range = NULL,
na.rm = TRUE,
...
)
Data frame or eegUtils
object to be plotted.
Other arguments passed to the method.
Electrode for which to generate an ERP image.
Time limits of plot.
Number of trials to smooth over when generating image.
Character vector of min and max values of plotting colour range. e.g. c(-5,5). Defaults to min and max.
Perform interpolation to produce smoother looking plots. Defaults to FALSE.
Remove trials with NA amplitudes after smoothing. Defaults to TRUE.
eeg_ICA
component to plot
A numeric vector specify the range of frequencies to average over. A single number will find the closest matching frequency. A vector of length two will match average over frequencies within that range.
A ggplot
object
erp_image(data.frame)
: Default function operates on normal data frames
erp_image(eeg_epochs)
: Create an erp_image
from eeg_epochs
erp_image(eeg_ICA)
: Plot component image from eeg_ICA
erp_image(eeg_tfr)
: Plot component image from eeg_tfr
erp_image(demo_epochs, electrode = "A31")
erp_image(demo_epochs, electrode = "A31", interpolate = TRUE)
erp_image(demo_epochs, electrode = "A31", smoothing = 5)
erp_image(compute_tfr(demo_epochs,
foi = c(4, 30), n_cycles = 3, n_freq = 20, verbose = FALSE, keep_trials = TRUE),
electrode = "A31", freq_range = c(8, 12))