annotation_table()
modifies the data.table
class to work
with annotation data. The columns are of all equal length, and each row
describes a single annotation (although there may be duplicate time points).
annotation_table(
annotator = character(),
time = character(),
sample = integer(),
frequency = integer(),
type = character(),
subtype = character(),
channel = integer(),
number = integer(),
...
)is_annotation_table(x)
A data.table
that has invariant columns that are compatible with
the WFDB library. The key columns include the sample index, the type of
annotation (and its subtype and number qualifier), and the channel.
String that is the name of a WFDB-compatible annotation
type, serving as the extension for the file that is written containing that
annotation. Please see read_annotation()
and write_annotation()
for
further details.
A character
time stamp of the annotation, written in the format
of HH:MM:SS.SSS, starting at 00:00:00.000. This is converted to the
appropriate time based on the header file (which records the actual start
time and sampling frequency). This is often a missing variable and is
given for compatibility with the WFDB applications.
An integer
representing the sample number of the annotation
An integer
that represents the sampling frequency in Hertz
A character
or string representing the type of the annotation
A character
or string representing the subtype of the
annotation
An integer
representing the channel number of the
annotation, or a character
representing the channel name
An additional integer
value or number that classifies the
annotation (allows for compatibility with multiple annotation types)
Additional arguments to be passed to the function
A data.table
object that represents an annotation table
The following annotation file types are described below.
ecgpuwave
ecgpuwave
analyzes an ECG signal from the specified record, detecting the
QRS complexes and locating the beginning, peak, and end of the P, QRS, and
ST-T waveforms. The output of ecgpuwave is written as a standard WFDB-format
annotation file (the extension is "*.ecgpuwave", as would be expected). This
file can be converted into text format using rdann
. Further details are
given at the ECGPUWAVE
page.
The type column can be p, t, or N for the peak of the P wave, T wave, and QRS (R peak) directly. The output notation also includes waveform onset XXX and waveform offset XXX. The number column gives further information about each of these type labels.
The number column gives modifier information. If the type classifier is a T wave annotation, the number column can be 0 (normal), 1 (inverted), 2 (positive), 3 (negative), 4 (biphasic negative-positive), 5 (biphasic positive-negative). If the type is an waveform onset or offset, then number can be 0 (P wave), 1 (QRS complex), 2 (T wave).
The annotation_table()
function creates a compatible table that
can be used with write_annotation()
and read_annotation()
functions.