tests/testthat/test-muse.R

test_that("convert ECG from MUSE XML format to WFDB", {

	# ECG XML file
	file <- system.file("extdata", "muse-sinus.xml", package = "EGM")

	# Get signal data
	ecg <- read_muse(file)
	expect_length(ecg, 3)
	expect_length(ecg$signal, 13)
	expect_equal(nrow(ecg$signal), 5000)
	expect_s3_class(ecg, "egm")
	expect_s3_class(ecg$signal, "signal_table")
	expect_s3_class(ecg$signal, "data.table")
	expect_s3_class(ecg$header, "header_table")

})

Try the EGM package in your browser

Any scripts or data that you put into this service are public.

EGM documentation built on June 22, 2024, 6:53 p.m.