scorepeak is an R package for peak detection in univariate time series.
scorepeak provides peak functions, which enable us to detect peaks.
you can install scorepeak from GitHub.
Run the following R code to install scorepeak.
devtools::install_github("ShotaOchi/scorepeak")
A simple demo of peak detection is shown below.
library(scorepeak)
data("ecgca102")
lp <- detect_localmaxima(ecgca102, 13)
score <- score_type1(ecgca102, 51)
detected <- score > 0.03 & lp
plot(ecgca102, type = "l")
points(which(detected), ecgca102[detected], pch = 19, col = "red")
You're welcome to create issues for any bug report or suggestion on the issues page.
You can also fork this repository and send me a pull request for bug fixes or additional features.