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")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
annotationthat contains either the WFDB symbol (default, for thetypecolumn) or the label store values. If the column is numeric it is matched onlabel_store, otherwise a symbol lookup is performed.
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.
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
wfdb_annotation_labels()
#> label_store symbol mnemonic description
#> 1 0 NOTANN Not an actual annotation
#> 2 1 N NORMAL Normal beat
#> 3 2 L LBBB Left bundle branch block beat
#> 4 3 R RBBB Right bundle branch block beat
#> 5 4 a ABERR Aberrated atrial premature beat
#> 6 5 V PVC Premature ventricular contraction
#> 7 6 F FUSION Fusion of ventricular and normal beat
#> 8 7 J NPC Nodal (junctional) premature beat
#> 9 8 A APC Atrial premature contraction
#> 10 9 S SVPB Premature or ectopic supraventricular beat
#> 11 10 E VESC Ventricular escape beat
#> 12 11 j NESC Nodal (junctional) escape beat
#> 13 12 / PACE Paced beat
#> 14 13 Q UNKNOWN Unclassifiable beat
#> 15 14 ~ NOISE Signal quality change
#> 16 16 | ARFCT Isolated QRS-like artifact
#> 17 18 s STCH ST change
#> 18 19 T TCH T-wave change
#> 19 20 * SYSTOLE Systole
#> 20 21 D DIASTOLE Diastole
#> 21 22 " NOTE Comment annotation
#> 22 23 = MEASURE Measurement annotation
#> 23 24 p PWAVE P-wave peak
#> 24 25 B BBB Left or right bundle branch block
#> 25 26 ^ PACESP Non-conducted pacer spike
#> 26 27 t TWAVE T-wave peak
#> 27 28 + RHYTHM Rhythm change
#> 28 29 u UWAVE U-wave peak
#> 29 30 ? LEARN Learning
#> 30 31 ! FLWAV Ventricular flutter wave
#> 31 32 [ VFON Start of ventricular flutter/fibrillation
#> 32 33 ] VFOFF End of ventricular flutter/fibrillation
#> 33 34 e AESC Atrial escape beat
#> 34 35 n SVESC Supraventricular escape beat
#> 35 36 @ LINK Link to external data (aux_note contains URL)
#> 36 37 x NAPC Non-conducted P-wave (blocked APB)
#> 37 38 f PFUS Fusion of paced and normal beat
#> 38 39 ( WFON Waveform onset
#> 39 40 ) WFOFF Waveform end
#> 40 41 r RONT R-on-T premature ventricular contraction
wfdb_annotation_labels(symbol = c("N", "V"))
#> label_store symbol mnemonic description
#> 1 1 N NORMAL Normal beat
#> 2 5 V PVC Premature ventricular contraction
ann <- annotation_table(
annotator = "example",
sample = c(100L, 200L),
type = c("N", "V")
)
wfdb_annotation_decode(ann)
#> type time sample subtype channel number label_store mnemonic
#> <char> <char> <int> <char> <int> <int> <int> <char>
#> 1: N 100 0 0 1 NORMAL
#> 2: V 200 0 0 5 PVC
#> description
#> <char>
#> 1: Normal beat
#> 2: Premature ventricular contraction