Learn R Programming

EGM (version 0.2.0)

wfdb_annotation_labels: Standard WFDB annotation nomenclature

Description

Provides the standard label definitions used by WFDB annotation files. These helper functions make it easier to interpret the contents of the annotation_table() object by exposing the symbol, mnemonic, and description that correspond to each label store value defined in the WFDB Applications Guide (Moody and collaborators).

Usage

wfdb_annotation_labels(symbol = NULL, label_store = NULL)

wfdb_annotation_decode(annotation, column = "type")

Value

wfdb_annotation_labels() returns a data frame with columns label_store, symbol, mnemonic, and description. wfdb_annotation_decode() returns the input annotation table with the WFDB nomenclature columns appended.

Arguments

symbol

Optional character vector of WFDB annotation symbols to filter the results.

label_store

Optional integer vector of WFDB label store values to filter the results.

annotation

An annotation_table() or compatible data frame whose annotation symbols or label store values should be augmented with the standard WFDB nomenclature.

column

Name of the column within annotation that contains either the WFDB symbol (default, for the type column) or the label store values. If the column is numeric it is matched on label_store, otherwise a symbol lookup is performed.

Details

The returned table is derived from the WFDB Application Guide and matches the canonical label store values used by the WFDB software distribution. Entries that are not currently defined by the specification are omitted.

References

Moody GB. WFDB Applications Guide. PhysioNet. Available at https://www.physionet.org/physiotools/wag/.

Examples

Run this code
wfdb_annotation_labels()

wfdb_annotation_labels(symbol = c("N", "V"))

ann <- annotation_table(
  annotator = "example",
  sample = c(100L, 200L),
  type = c("N", "V")
)

wfdb_annotation_decode(ann)

Run the code above in your browser using DataLab