Decluster_SW: Declusters a time series using a storm window approach

View source: R/Decluster_SW.R

Decluster_SWR Documentation

Declusters a time series using a storm window approach

Description

Find peaks with a moving window. The code is based on the IDEVENT function provided by Sebastian Solari.

Usage

Decluster_SW(Data, Window_Width)

Arguments

Data

Data frame containing two columns. In column:

  • 1 A "Date" object of equally spaced discrete time steps.

  • 2 Numeric vector containing corresponding time series values.

Window_Width

Numeric vector of length one specifying the width, in days, of the window used to ensure events are independent.

Value

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.

Examples

#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)

rjaneUCF/MultiHazard documentation built on April 20, 2024, 12:48 a.m.