
Remove (transform to NA) problematic events from the signal table of an eeg_lst.
Source:R/artifact_edition.R
eeg_events_to_NA.RdRemove (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_lstobject.- ...
Description of the problematic event.
- .n_chs
If set to
NULL(default), it will only setNAto the relevant channel.If set to a numberN, it will set all the channels of the entire segment or interval toNA, ifNor 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.
See also
Other events functions:
eeg_artif
Examples
if (FALSE) { # \dontrun{
# 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)
} # }