generated with r R.version.string and smires version r packageVersion("smires")

knitr::opts_chunk$set(echo = TRUE)
library(ggplot2)

This document was created with package version r packageVersion("smires"). Currently the following data sets are already included in the package:

library(smires)
data(package = "smires")$results[, "Item"]

Let's print the first observations of the river Balder at station Balderhead Reservoir:

head(balder)

For the time being, each time series of discharges is a data.frame with the first column being the time index (of class Date) and the second column being the discharge. In this particular data set the unit of discharge is m³/s.

library(ggplot2)
ggplot(balder, aes(time, discharge)) + geom_line() +
  labs(x = "", y = "discharge in m³/s")

A few checks are performed prior to the computation of indices.

balder <- validate(balder, accuracy = 0.005)

Units

For the time being only daily time series are supported. The default value of the threshold flow (0.001 m³/s) is only appropriate if your discharges are also in m³/s. If not, do not forget to choose a meaningful threshold.

Threshold

A day is attributed to no-flow if the observed discharge is smaller or equal to the threshold discharge. Given a threshold of 0 m³/s and an observed discharge of 0 m³/s, this day is classified as no-flow.

Time intervals

head(find_spells(balder), 2)

A time interval like in the example above is constructed in a way that $duration = end - start$ implying that the end date is not part of the interval, it is a right opened interval: $[start,\ end)$.



mundl/smires documentation built on May 23, 2019, 8:22 a.m.