topoCoord: Compute projections for plotting scalp topographies

Description Usage Arguments Value Note

View source: R/plots.R

Description

topoCoord computes the topographic projection of the amplitudes at the given peaks.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
topoCoord(
  dat,
  peak_df,
  ch_pos,
  size_x,
  size_y,
  shift_y,
  r = 1,
  ampl_range = NULL,
  resol = 50L,
  resolcol = 101L,
  projection = "laea",
  projref = c("pole", "equator"),
  origo = c(lat = ifelse(projref == "pole", 90, 0), long = ifelse(projref == "pole",
    270, 0)),
  ...
)

Arguments

dat

array of ERP data

peak_df

data.frame of peaks (time and potentially other facetting variables)

ch_pos

data.frame of channel positions

size_x

the width of the topoplot in time units

size_y

the height of the topoplot in amplitude units

shift_y

the vertical center of the topoplot in amplitude units

r

radius of the channel positions if ch_pos does not contain it (default: 1)

ampl_range

numeric vector of length 2 containing the minimum and maximum values. If NULL, it is computed from the data. Values outside the ampl_range interval are set equal to the corresponding limit.

resol

an integer value; the resolution of the grid topographic map in horizontal and vertical direction (default: 30)

resolcol

integer value, the number of levels (resolution) for colouring (default: 101L)

projection

character value (default = "laea"). See http://www.remotesensing.org/geotiff/proj_list/ for common projections.

projref

projection reference (pole [default] or equator)

origo

a named character vector of lat and long coordinates of the origo

...

arguments passed to chanInterp. You might consider setting the argument N for dense electrode caps.

Value

The function returns a named list of two data.table objects (topo and boundary).

Note

This function is called by plotButterfly and plotMap.


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