eeg_events_to_NA: Remove (transform to NA) problematic events from the signal...

View source: R/artifact_edition.R

eeg_events_to_NAR Documentation

Remove (transform to NA) problematic events from the signal table of an eeg_lst.

Description

Remove (transform to NA) problematic events from the signal table of an eeg_lst.

Usage

eeg_events_to_NA(
  x,
  ...,
  .n_chs = NULL,
  .entire_seg = TRUE,
  .drop_events = TRUE,
  .all_chs = FALSE
)

Arguments

x

An eeg_lst object.

...

Description of the problematic event.

.n_chs

If set to NULL (default), it will only set NA to the relevant channel.If set to a number N, it will set all the channels of the entire segment or interval to NA, if N or more channels have a certain event, and otherwise only the relevant channel.

.entire_seg

If set to FALSE, it will consider only the marked part of the segment, otherwise it will consider the entire segment (Default: .entire_seg = TRUE).

.drop_events

If set to TRUE (default), the events that were used for setting signals to NA, will be removed from the events table.

.all_chs

Deprecated.

Value

An eeg_lst.

See Also

Other events functions: eeg_artif

Examples

## Not run: 

# Signals with artifacts are turned into NA values:
faces_clean <- faces_seg_artif %>%
  eeg_events_to_NA(.type == "artifact", .entire_seg = TRUE, .drop_events = TRUE)


# Specific segments are turned into NA values:
faces_clean <- faces_seg_artif %>%
  eeg_events_to_NA(.id %in% c(1:3), .entire_seg = TRUE, .drop_events = TRUE)

## End(Not run)


bnicenboim/eeguana documentation built on March 16, 2024, 7:21 a.m.