ecg                   package:ade4                   R Documentation

_E_l_e_c_t_r_o_c_a_r_d_i_o_g_r_a_m _d_a_t_a

_D_e_s_c_r_i_p_t_i_o_n:

     These data were measured during the normal sinus rhythm of a
     patient who occasionally experiences arrhythmia.  There are 2048
     observations measured in units of millivolts and collected at a
     rate of 180 samples per second. This time series is a good
     candidate for a multiresolution analysis because its components
     are on different scales. For example, the large scale (low
     frequency) fluctuations, known as baseline drift, are due to the
     patient respiration, while the prominent short scale (high
     frequency) intermittent fluctuations between 3 and 4 seconds are
     evidently due to patient movement. Heart rhythm determines most of
     the remaining features in the series.  The large spikes occurring
     about 0.7 seconds apart the R waves of normal heart rhythm; the
     smaller, but sharp peak coming just prior to an R wave is known as
     a P wave; and the broader peak that comes after a R wave is a T
     wave.

_U_s_a_g_e:

     data(ecg)

_F_o_r_m_a_t:

     A vector of class 'ts' containing 2048 observations.

_S_o_u_r_c_e:

     Gust Bardy and Per Reinhall, University of Washington

_R_e_f_e_r_e_n_c_e_s:

     Percival, D. B., and Walden, A.T. (2000) _Wavelet Methods for Time
     Series Analysis_, Cambridge University Press.

_E_x_a_m_p_l_e_s:

     ## Not run: 
     # figure 130 in Percival and Walden (2000)
     if (require(waveslim) == TRUE) { 
     data(ecg)
     ecg.level <- haar2level(ecg)
     ecg.haar <- orthobasis.haar(length(ecg))
     ecg.mld <- mld(ecg, ecg.haar, ecg.level, plot = FALSE)
     res <- cbind.data.frame(apply(ecg.mld[,1:5],1,sum), ecg.mld[,6:11])
     par(mfrow = c(8,1))
     par(mar = c(2, 5, 1.5, 0.6))
     plot(as.ts(ecg), ylab = "ECG")
     apply(res, 2, function(x) plot(as.ts(x), ylim = range(res),
      ylab = ""))
     par(mfrow = c(1,1))
     }
     ## End(Not run)

