View source: R/unusablesensors.R
unusablesensors | R Documentation |
Detect unusable sensors containing NA or constant values
unusablesensors(x)
x |
input data, 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 |
Constant values are defined to have a standard deviation or a median absolute deviation smaller than 10e-10.
a named list:
number of unusable channels
a named integer vector containing all unusable sensors
a named integer vector containing sensors with missing values
a named integer vector containing sensors with constant values
Original Matlab code by Tim Mullen (2011); ported to R and adapted by Geert van Boxtel, G.J.M.vanBoxtel@gmail.com,
bad <- unusablesensors(EEGdata)
if (bad$n > 0) good <- EEGdata[, -bad$unusable]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.