lannots: Returns a vector of annotation class names for the attached...

View source: R/luna.R

lannotsR Documentation

Returns a vector of annotation class names for the attached EDF

Description

Returns a vector of annotation class names, or all intervals for a given annotation class

Usage

lannots(a = "")

Arguments

a

an optional annotation name, i.e. matching one value returned by lannots()

Value

If no specific annotation is specified, this returns a vector of annotation class names for the attached dataset. Alternatively, if a is a valid annotation class name for that individual, this function instead returns a list of intervals (two-element vectors) for each instance of that annotation class.

Examples

## Not run: 
## no specific annotation
> lannots()
[1] "NREM1"             "NREM2"             "NREM3"
[4] "REM"               "apnea_obstructive" "arousal"
[7] "artifact_SpO2"     "desat"             "hypopnea"
[10] "wake"

## valid annotation class name specified
> head(lannots("wake"))
[[1]]
[1]  0 30
[[2]]
[1] 30 60
[[3]]
[1] 60 90
[[4]]
[1]  90 120
[[5]]
[1] 120 150
[[6]]
[1] 150 180


## End(Not run)

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