I am currently using findpeaks function to distinguish peak values of electrocardiogram.
I have attached part of graph.
I have wrote a following code
peaks<- findpeaks(dataset[,2], minpeakheight = 1)
dataset[,2] has full values of electrocardiogram in time series. I have inserted minpeakheight value as 1. In a sample data set, there are total of 68 R peaks but this function only distinguishes 64 R peaks.
Seems like I need to give more variables for more accurate values. However, I am not sure what I should insert for other variables such as nups and ndowns. Any idea?