Skip to content

warnuk/extremaR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

extremaR

extremaR is an R package for detecting peaks and troughs in 1D datasets, with optional smoothing, prominence, and distance filtering. Intended for geoscience applications such as grain-size distributions, elemental profiles, and paleoclimate time series.

Installation

# Install devtools if needed
# install.packages("devtools")
devtools::install_github("warnuk/extremaR")

Example

library(extremaR)

x <- seq(0, 2*pi, length.out = 1000)
y <- sin(2*x) + rnorm(1000, 0, 0.05)

extrema <- find_extrema(y, x, smooth_window = 11, min_prominence = 0.2)
plot_extrema(y, extrema, x)

About

R package for detecting peaks and troughs in 1D datasets

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages