select_elecs: Select electrodes from a given dataset

Description Usage Arguments Value Methods (by class) Author(s) See Also Examples

View source: R/data_selection.R

Description

This is a generic function for selection of electrodes from an EEG dataset.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
select_elecs(data, ...)

## Default S3 method:
select_elecs(data, electrode = NULL, keep = TRUE,
  ...)

## S3 method for class 'eeg_data'
select_elecs(data, electrode, keep = TRUE,
  df_out = FALSE, ...)

## S3 method for class 'eeg_evoked'
select_elecs(data, electrode = NULL, keep = TRUE,
  df_out = FALSE, ...)

## S3 method for class 'eeg_ICA'
select_elecs(data, component, keep = TRUE,
  df_out = FALSE, ...)

## S3 method for class 'eeg_tfr'
select_elecs(data, electrode, keep = TRUE,
  df_out = FALSE, ...)

Arguments

data

An EEG dataset.

...

Arguments used with related methods

electrode

A character vector of electrode labels for selection or removal.

keep

Defaults to TRUE. Set to false to *remove* the selected electrodes.

df_out

Defaults to FALSE. Set to TRUE to return a dataframe rather than an eeg_data object.

component

Component to select

Value

Data frame with only data from the chosen electrodes

eeg_data object with selected electrodes removed/kept.

Methods (by class)

Author(s)

Matt Craddock, [email protected]

See Also

select_times and select_epochs

Other Data selection functions: select_times

Examples

1
2
3
names(demo_epochs$signals)
keep_A5 <- select_elecs(demo_epochs, electrode = "A5")
remove_A5 <- select_elecs(demo_epochs, electrode = "A5", keep = FALSE)

craddm/eegUtils documentation built on Dec. 8, 2018, 2:15 p.m.