eeg_segment | R Documentation |
eeg_segment()
subdivides of the EEG into different segments or epochs. (Fieldtrip calls the segment "trials".) The limits of segment
are inclusive: If, for example, lim = c(0,0)
, the segment would contain only sample 1.
eeg_segment(.data, ..., .lim = c(-0.5, 0.5), .end, .unit = "s")
eeg_unsegment(
.data,
.start = 1,
.sep = c(.type = "New Segment", .description = ""),
.zero = c(.type = "Time 0", .description = "")
)
.data |
An |
... |
Description of the event. |
.lim |
Vector indicating the time before and after the event. Or dataframe with two columns, with nrow=total number of segments |
.end |
Description of the event that indicates the end of the segment, if this is used, |
.unit |
"seconds" (or "s"), "milliseconds" (or "ms"), or samples. |
.start |
Initial sample when an object is unsegmented |
.sep |
Segment separation marker. By default: |
.zero |
Time zero marker. By default: |
eeg_unsegment()
does not reverse the segmentation, it simply concatenates all segments creating one object with only one segment.
When there is no segmentation, the eeg_lst
contain one segment.
An eeg_lst
.
Other preprocessing functions:
eeg_baseline()
,
eeg_downsample()
,
eeg_ica_keep()
,
eeg_ica()
,
eeg_rereference()
,
filt
# Segments 500ms before and 1000ms after the triggers s70 and s71
data_faces_10_trials %>% eeg_segment(.description %in% c("s70", "s71"),
.lim = c(-5, 1)
)
# Segments 500ms before and after the triggers all the triggers (which start with s)
data_faces_10_trials %>% eeg_segment(startsWith(.description, "s"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.