erp_scalp: Plot event-related potentials using a scalp based layout

View source: R/erp_scalp.R

erp_scalpR Documentation

Plot event-related potentials using a scalp based layout

Description

Creates a ggplot2 figure showing the ERP at each electrode, with each electrode placed according to its location on the scalp.

Usage

erp_scalp(data, ...)

## Default S3 method:
erp_scalp(
  data,
  electrode = "electrode",
  amplitude = "amplitude",
  time = "time",
  color = NULL,
  colour = NULL,
  size = 0.8,
  baseline = NULL,
  show_guide = TRUE,
  chan_info = NULL,
  montage = NULL,
  ...
)

Arguments

data

An EEG dataset.

...

Various arguments passed to specific functions

electrode

Column name containing electrode names in data. Defaults to "electrode".

amplitude

Column name containing amplitudes in data. Defaults to "amplitude".

time

Column name containing time in data. Defaults to "time".

color

Alias for colour.

colour

Variable to colour lines by. If no variable is passed, only one line is drawn for each electrode.

size

Size of the line(s) for the ERPs.

baseline

Character vector of times to subtract for baseline correct.

show_guide

Should a guide showing the scale of the ERP plots be shown. Defaults to TRUE.

chan_info

Pass channel information in the standard eegUtils format directly.

montage

Name of an existing montage set. Defaults to NULL, which will attempt to us locations from the data. If none are found, it will attempt to use standard 10-05 locations.

Value

Returns a ggplot2 plot object.

Methods (by class)

  • default: Plot an ERP scalp map

Author(s)

Matti Vuorre, mv2521@columbia.edu

Matt Craddock, matt@mattcraddock.com

See Also

interactive_scalp() for interactive plots of ERPs in a scalp-based layout.

Other scalp-based maps: interactive_scalp(), topoplot()

Examples

erp_scalp(demo_epochs, montage = "biosemi64alpha")


craddm/eegUtils documentation built on March 24, 2022, 9:17 a.m.