Description Usage Arguments Value
View source: R/recessions_analysis.R
This function extracts the index of the start and end of each recession event which are returned in a two columns data.frame
1 2 3 4 5 6 7 8 9 | recession_events_index(
Q,
minduration,
maxduration,
minvalue,
n_smooth,
window_smooth,
return_smoothed = FALSE
)
|
Q |
numeric vector. Streamflow vector. |
minduration |
integer. Minimum duration of a recession event in days |
maxduration |
integer. Maximum duration of a recession event in days |
minvalue |
float. Minimum streamflow value to consider a local maximum as a potential start of a recession event |
n_smooth |
integer. How many times the rolling mean is to be applied on the streamflow timeseries before applying the recession events extraction |
window_smooth |
integer. The size, in days, of the window over which the rollogin mean is to be applied. |
return_smoothed |
logical. Whether the smoothed streamflow timeseries should be returned as well. |
Returns a two columns data.frame with the 'start' and 'end' index of each recession event. If 'return_smoothed' is TRUE, a list with two elements is returned: 'i_events' containing the the data.frame with the 'start' and 'end' index of the recession events and 'Q_smoothed' containing the smoothed streamflow vector.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.