Decluster_SW | R Documentation |
Find peaks with a moving window. The code is based on the IDEVENT
function provided by Sebastian Solari.
Decluster_SW(Data, Window_Width)
Data |
Data frame containing two columns. In column:
|
Window_Width |
Numeric vector of length one specifying the width, in days, of the window used to ensure events are independent. |
List comprising vectors containing the original time series Detrended
, independent (declustered) events Declustered
and the elements of the original series containing the declustered events EventID
.
#Declustering the O-sWL at site S22 using a 3-day window.
v<-Decluster_SW(Data=S22.Detrend.df[,c(1:2)],Window_Width=7)
plot(as.Date(S22.Detrend.df$Date),S22.Detrend.df$Rainfall,pch=16)
points(as.Date(S22.Detrend.df$Date)[v$EventID],v$Event,col=2,pch=16)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.