Here you will find daily news and tutorials about R, contributed by over 573 bloggers.
There are many ways to follow us - By e-mail:On Facebook: If you are an R blogger yourself you are invited to add your own R content feed to this site (Non-English R bloggers should add themselves- here)

After reading (most of) “The Scientists and Engineers Guide to Digital Signal Processing” by Steven W. Smith, PhD, I decided to take a second crack at the ECG data. I wrote a set of R functions that implement a windowed (Blackman) sinc low-pass filter. The convolution of filter kernel with the input signal is conducted in the frequency domain using the fast Fourier transform, which is much of the focus of Smith’s book.You can check out the complete R script. Also, you can reproduce the analysis and the image below in R by running the following command

source("http://biostatmatt.com/R/ecg.R")

The low-pass filter was first applied to eliminate the high frequency noise, anything greater than 30Hz. I next applied the filter at a cutoff frequency of 1Hz in order to isolate the slow wave that corresponds to respirations. The image below gives the sequence of filtering.

Related

To leave a comment for the author, please follow the link and comment on their blog: BioStatMatt » R.