Last data update: 2014.03.03

R: Calculates and Plots spectrogram
PlotSpectrogramR Documentation

Calculates and Plots spectrogram

Description

Plots spectrogram of the heart rate signal as calculated by CalculateSpectrogram() function

Usage

PlotSpectrogram(HRVData, size, shift, sizesp=NULL, freqRange = NULL, 
                scale="linear", verbose=NULL) 

Arguments

HRVData

Data structure that stores the beats register and information related to it

size

Size of window for calculating spectrogram (seconds)

shift

Displacement of window for calculating spectrogram (seconds)

sizesp

Points for calculation (zero padding). If the user does not specify it, the function estimates a propper value.

freqRange

Vector with two components specifying the frequency range that the program should plot. If the user does not specify it, the function uses the whole frequency range.

scale

Scale used to plot spectrogram, linear or logarithmic

verbose

Deprecated argument maintained for compatibility, use SetVerbose() instead

Note

An example including all the necessary steps to obtain the power
bands of a wfdb register is giving below:

##Reading a wfdb register and storing into a data structure:
md = CreateHRVData(Verbose = TRUE)
md = LoadBeatWFDB(md, RecordName = "register_name",
RecordPath = "register_path")

##Calculating heart rate signal:
md = BuildNIHR(md)

##Filtering heart rate signal:
md = FilterNIHR(md)

##Interpolating heart rate signal:
md = InterpolateNIHR(md)

##Calculating and Plotting Spectrogram
PlotSpectrogram(md, size = 120, shift = 10, sizesp = 1024)

Author(s)

M. Lado, A. Mendez, D. Olivieri, L. Rodriguez, X. Vila

References

L. Rodriguez-Linares, X. Vila, A. Mendez, M. Lado, D. Olivieri, "RHRV: An R-based software package for heart rate variability analysis of ECG recordings," 3rd Iberian Conference in Systems and Information Technologies (CISTI 2008), Proceedings I, 565-573, ISBN: 978-84-612-4476-8 (2008)

See Also

CalculateSpectrogram for spectrogram calculation

Results