plotComplex: Visualize ERP curves and scalp topographies

Description Usage Arguments

View source: R/plots.R

Description

plotComplex is a workhorse function called by plotButterfly and plotMap.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
plotComplex(
  dat,
  sig = NULL,
  topo_time = NULL,
  chan_pos = NULL,
  subset = list(),
  plot_curves = TRUE,
  pcrit = 0.05,
  aspect_ratio = 0.5,
  scalp_ratio = 0.5,
  ampl_range = NULL,
  map_marker_colour = "red",
  map_marker_shape = 16,
  map_marker_size = 1,
  ggplot_theme = theme_ndys,
  ...
)

Arguments

dat

the array of ERP curves which must have at least 'time' and/or 'chan' dimensions

sig

[optional] a corresponding array to dat which is used to highlight significant time windows. It must have at least 'time' and measure' dimensions. The 'measure' dimension must have 'p' and 'p_corr' levels indicating the uncorrected ('p') and corrected ('p_corr') p-values.

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).

chan_pos

a data.frame of channel positions. Obligatory if topo_time is not NULL.

subset

a named list to subset the input arrays; see subsetArray

pcrit

the level of alpha to highlight significant effects

aspect_ratio

the ratio of y and x axes (default: 0.5) on the figure. If NULL, it is set automatically. If 'topo_time' is provided, user-defined 'aspect_ratio' might be adjusted to avoid overlapping scalp maps.

scalp_ratio

the ratio of the diameter of the scalp and the vertical range of the ERP curves on the figure

ampl_range

the range of amplitudes to plot. If NULL (default), it is computed from the data.

map_marker_colour, map_marker_shape, map_marker_size

the colour, shape, and size of the marker used to mark the exact time points of the maps

ggplot_theme

a function which produces a ggplot theme (default: theme_ndys)

...

additional arguments passed to topoCoord


tdeenes/eegR documentation built on April 19, 2021, 4:17 p.m.