eeginterp: eeginterp

eeginterpR Documentation

eeginterp

Description

Spherical spline interpolation of EEG data

Usage

eeginterp(
  x,
  sl = getLocationsfromLabels(colnames(x)),
  bad,
  method = "spherical"
)

Arguments

x

input time series, specified as a numeric matrix or vector. In case of a vector it represents a single signal; in case of a matrix each column is a signal. Alternatively, an object of class ctd

sl

sensor locations of x, specified as a data frame according to sensorlocs format. Alternatively, a matrix with named columns x, y, and z representing the sensor locations. Default: obtained from the sensor names given by the column names of x.

bad

sensor locations of the bad sensors (those to interpolate), specified in one of the following forms:

  • a data frame in sensorlocs format

  • a matrix with named columns x, y, and z representing the sensor locations

  • a character vector containing sensor names

  • a numeric vector representing columns of x

method

method used for interpolation, specified as a character string. Currently, only "spherical" is supported.

Details

The data at bad sensors is replaced by interpolated data from remaining sensors using spherical spline interpolation (Perrin et al., 1989).

Value

interpolated bad sensors, returned as an object of the same class and dimensions as the input

Author(s)

Matlab code for EEGlab, Copyright (C) Arnaud Delorme, CERCO, 2006, arno@salk.edu. Ported to R and adapted by Geert van Boxtel, G.J.M.vanBoxtel@gmail.com

References

Perrin, F., Pernier, J., Bertrand, O., & Echallier, J. F. (1989). Spherical splines for scalp potential and current density mapping. Electroencephalography and clinical neurophysiology, 72(2), 184-187.

Examples

## Not run: 
x <- EEGdata[, 1:28]
y <- eeginterp(x, bad = "T7, T8")
plot(ctd(x, fs = fs(EEGdata)))
plot(ctd(y, fs = fs(EEGdata)))

## End(Not run)



gjmvanboxtel/eegr documentation built on May 20, 2023, 4:26 a.m.