Description Usage Arguments Value See Also Examples
imageValues
creates an image plot from a matrix or array of channel x
time values
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
dat |
numeric matrix or array of values with named dimensions (at least chan and time) |
grid |
character vector or formula defining the layout of panels |
wrap |
character vector or formula defining the dimension which separates panels (only considered if grid is NULL) |
bar_title |
character string; the title of the colour bar |
time_label |
character string; the label of the x (time) axis (default: "Time (ms)") |
channel_label |
character string; the label of the y (channel) axis default: "Channels") |
raster |
use raster image (TRUE, default) or not (FALSE) |
cluster_order |
logical; if TRUE, channels are ordered with hierarchical agglomerative clustering (default: FALSE) |
low, mid, high |
colour for low/mid/high end of gradient, respectively |
midpoint |
the midpoint (in data value) of the diverging scale (default: 0) |
... |
other arguments passed to |
A ggplot object
imagePvalues
for plotting p-values, and
plotERParray
for multiline (butterfly) plots
1 2 3 4 5 6 7 8 9 10 11 12 13 | # example dataset
data(erps)
# plot grand averages
avgs <- avgDims(erps, "id")
imageValues(avgs)
# imageValues returns a ggplot object, which can be modified afterwards
implot <- imageValues(avgs)
# modify faceting and theme
library(ggplot2)
implot + facet_grid(pairtype ~ stimclass) + theme_bw()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.