wfdb_io {EGM} | R Documentation |
I/O of WFDB-compatible signal & header files from EP recording systems
Description
This function allows for WFDB files to be read from any WFDB-compatible system, and also allows writing out WFDB-compatible files from specific EP recording systems, as indicated in the details section. Writing WFDB leads to creation of both a dat (signal) and hea (header) file. These are both required for reading in files as well.
Usage
write_wfdb(
data,
record,
record_dir,
wfdb_path = getOption("wfdb_path"),
header = list(frequency = 250, gain = 200L, label = character()),
info_strings = list(),
...
)
read_wfdb(
record,
record_dir = ".",
annotator = NA_character_,
wfdb_path = getOption("wfdb_path"),
begin = 0,
end = NA_integer_,
interval = NA_integer_,
units = "digital",
channels = character(),
...
)
read_signal(
record,
record_dir = ".",
wfdb_path = getOption("wfdb_path"),
begin = 0L,
end = NA_integer_,
interval = NA_integer_,
units = "digital",
channels = character(),
...
)
read_header(record, record_dir = ".", wfdb_path = getOption("wfdb_path"), ...)
Arguments
data |
Can either be an
|
record |
String that will be used to name the WFDB record. Cannot include extensions, and is not a filepath. alphanumeric characters are acceptable, as well as hyphens (-) and underscores (_) |
record_dir |
File path of directory that should be used read and write files. Defaults to current directory. |
wfdb_path |
Path that leads to installed |
header |
A header file is an optional named list of parameters that will be used to organize and describe the signal input from the data argument. If the type is given, specific additional elements will be searched for, such as the low or high pass filters, colors, or other signal attributes. At minimum, the following elements are required (as cannot be calculated):
|
info_strings |
A |
... |
Additional arguments to be passed to the function |
annotator |
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 |
begin , end , interval |
Timepoint as an |
units |
A
|
channels |
Either the signal/channel in a |
Value
Depends on if it is a reading or writing function. For writing, will
output an WFDB-based object reflecting the function. For reading, will
output an extension of a data.table
object reflecting the underlying
function (e.g. signal_table()
will return an object of class).
Functions
-
write_wfdb()
: Writes out signal and header data into a WFDB-compatible format from R. -
read_wfdb()
: Reads a multicomponent WFDB-formatted set of files directly into anegm
object. This serves to pull togetherread_signal()
,read_header()
, andread_annotation()
for simplicity. -
read_signal()
: Specifically reads the signal data from the WFDB binary format, returning asignal_table
object for evaluation in the R environment -
read_header()
: Specifically reads the header data from the WFDB header text format, returning aheader_table
object for evaluation in the R environment
Recording systems
Type of signal data, as specified by the recording system, that are currently supported.
-
lspro = LabSystem Pro, e.g.
read_lspro()
-
muse = GE MUSE, e.g.
read_muse()