cosAngle: Cosine of the angles between electrodes

Description Usage Arguments Value

View source: R/chan_pos.R

Description

cosAngle computes the cosine of angles between electrodes or between any N-dimensional vectors, or between two sets of electrodes or any N-dimensional vectors.

Usage

1
cosAngle(x, y = NULL, coords = TRUE, units_in_rows = TRUE, check_params = TRUE)

Arguments

x

a matrix or data.frame with at least two columns and rows

y

If not NULL (default), a matrix or data.frame with at least two columns and rows

coords

a logical variable; if TRUE (default), data in x are coordinates. Coordinates should be named as "x", "y", "z" or "theta", "phi", and if names are present, only coordinate columns are used in the computations.

units_in_rows

a logical variable indicating whether the units (vectors) are in the rows of x (TRUE, default) or in the columns.

check_params

logical; if TRUE (default), the appropriateness of input data are checked before computing the cosine of angles. Set it to FALSE if you really know what you are doing.

Value

A symmetric matrix


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