RHRT: Synopsis for the hasty (Quick-start guide)

The RHRT package helps you assess Heart Rate Turbulence (HRT) in RR intervals and calculate turbulence onset (TO), slope (TS) and timing (TT). It can plot the tachograms and checks the results for reliability. The ventricular premature beats (VPCs) with coupling (CPI) and compensatory interval (CMI) can either be given with annotations or found on the basis of the filter rules as first described by Grimm et al. 2003. The type of average and order of calculation for all parameters can be set.

This vignette sums up the most common functions and parameters needed when using RHRT.


Loading package and data

library("RHRT")
# testdataLong is a numeric vector of RR intervals in msec
data("testdataLong", package = "RHRT")
ints <- testdataLong
# testdataLong_Ann is a character vector of annotations corresponding to testdataLong
data("testdataLong_Ann", package = "RHRT")
ann <- testdataLong_Ann

Checking interval data for HRTs

The core function of RHRT is vectorToHRT that finds valid VPCs in RR intervals and returns an HRTList object (see HRTList object in Objects & Functions for more information):

hrtl <- vectorToHRT(ints) 

Every RR interval sequence that matches the needed interval lengths is considered to be a coupling and compensatory interval of a VPC, which can lead to wrong matches. If your data is annotated, you can provide the annotation data with the parameters annotations and PVCAnn.

hrtl <- vectorToHRT(ints, annotations = ann, PVCAnn = "V")

Other parameters are:

  • numPreRRs & numPostRRs are used to modify the filter rules to find HRTs (number of intervals before and after the VPC that have to match the filter criteria).
  • minHRT is the minimal number of HRTs needed to calculate HRT / create a HRTList
  • normHallstrom defines whether TS should be normalised with the method of Hallstrom et al. (see the chapter Normalisation of Turbulence Slope in the scientific background for more information).

Getting HRT parameters or class

getResults(hrtl) # get the HRT class of the data
## [1] "NR"

Per default getResults checks whether all needed HRT parameters can be calculated reliably. This is done via a t-test per parameter value (for more information see chapter Reliability Check in the scientific background vignette). If any of the parameter values is not reliable getResults returns NR (not reliable).

getResults(hrtl, safe = FALSE) # get the HRT class without safety check
## [1] "HRT0"

In addition to the classification system HRT0-2 RHRT implements HRTA-C that is based on the three parameters TO, TS and TT.

getResults(hrtl, safe = FALSE, TT = TRUE) # include TT
## [1] "HRTA"

With the parameter type you can choose between getting only the HRT class, all parameter values or the parameter values with the corresponding p-values (types “class”, “parameter” or “full”, respectively).

getResults(hrtl, type = "parameter", TT = TRUE) # get the averaged HRT parameters
##                 TO                 TS                 TT 
##               "NR" "26.8151838839115"                "3"

Other parameters are:

  • nTS: the normalised TS is returned or used for classification instead of TS.
  • num: forces the function to return numerics when using type = parameter. Depending on the results and your setting of type the getResults returns characters or numerics.
  • pmax: changes the needed significance level for the parameters to be reliable.

Plotting

plot(hrtl, TT = TRUE) # plots the averaged VPCS and all underlying VPCSs in background

Per default the VPCS is zoomed in. If you want to also see the CPI and CMI use cropped = FALSE.

plot(hrtl, cropped = FALSE) # shows also coupling and compensatory interval


Further information can be found in the other vignettes about the objects and functions, the scientific background or with example pipelines.