View source: R/cut_dataToWaterYear.R
cut_dataToWaterYear | R Documentation |
Cuts the discharge time series to full water years
cut_dataToWaterYear(x, yearType, wyMonth = 10L)
x |
data.frame containing a vector of date values in the first column and vector of numeric flow values in the second column. |
yearType |
A character of either "water" or "calendar" indicating whether to use water years or calendar years, respectively. |
wyMonth |
A numeric. The month of the year in which the water year starts (1=January, 12=December). The water year begins on the first day of wyMonth. |
To ensure the input data is valid for use with other EflowStats functions. #'
First column must be of class 'Date'.
Second must be of class 'numeric'.
'yearType' input must be either "water" or "calendar".
'wyMonth'input must be of class 'integer'.
data.frame in original structure, but cut to full water years
x <- sampleData[, c('date', 'discharge')]
cut_dataToWaterYear(x,10L)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.