Description Usage Arguments Value See Also Examples
plotMap
takes an array (or a vector) of ERP amplitudes and plots
scalp topographies at user-defined time points.
1 2 3 4 5 6 7 8 9 10 11 12 |
dat |
either a numeric vector or a numeric array of ERP amplitudes. If 'dat' is a named vector, its names are taken as channel names. If unnamed, the order of the data must correspond to the order of channels in 'chan_pos'. If 'dat' is an array, it must have at least 'time' and 'chan' dimensions. |
chan_pos |
a data.frame of channel positions. Obligatory if
|
topo_time |
[optional] an object which describes the time points at which the scalp topographies should be plotted. Can be a simple atomic vector or a data.frame if the time points are not identical across the faceting dimension(s). |
subset |
a named list to subset the input arrays; see
|
aspect_ratio |
the ratio of |
ampl_range |
the range of amplitudes to plot. If |
map_marker_colour |
the colour, shape, and size of the marker used to mark the exact time points of the maps |
map_marker_shape |
the colour, shape, and size of the marker used to mark the exact time points of the maps |
map_marker_size |
the colour, shape, and size of the marker used to mark the exact time points of the maps |
... |
additional arguments passed to |
plotMap
returns a ggplot object.
plotButterfly
for a more complex way of visualizaton
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # load example data
data(erps)
# extract channel positions
chan_pos <- attr(erps, "chan")
# collapse pairtypes and participants
tempdat <- avgDims(erps, c("pairtype", "id"))
# plot topo-maps of stimclass differences from 0 to 500 in 50 ms steps
map <- plotMap(compareLevels(tempdat, "stimclass"),
topo_time = seq(0, 500, by = 50),
chan_pos = chan_pos)
# add title
library(ggplot2)
map + ggtitle("Pairwise differences between stimulus classes")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.