ldata.intervals: Extracts signal (and annotation) data from an EDF for one or...

View source: R/luna.R

ldata.intervalsR Documentation

Extracts signal (and annotation) data from an EDF for one or more intervals

Description

Returns raw signal and annotation data for requested intervals

Usage

ldata.intervals(i, chs, annots = character(0), w = 0)

Arguments

i

a required list of intervals (in seconds), e.g. as returned by lannots(annot)

chs

a required vector of channel names to be returned, i.e. as from lchs(), all of which are required to have the same sampling rate is a required vector of channel names

annots

an optional vector of annotation names to be returned, i.e. as from lannots()

w

an optional window (in seconds) the specifies whether the returned region should also contain a window of up to w seconds each side of the specified interval(s). For example, if the intervals represented individual sleep spindles, then adding w=10 would return windows of approximately 20 seconds, with the spindle centered in the middle.

Value

a data frame where each row is one sample point, containing the raw signal (and annotation) data. See the description of ldata's output for more information of columns

Note

This command is effectively the same as ldata() except that the regions of interest are specified as intervals rather than in terms of epoch numbers. Intervals are defined as half-open intervals [a,b), meaning all sample-points equal to or greater than a, but less than b.


remnrem/luna documentation built on June 1, 2025, 2:14 p.m.