cut_dataToWaterYear: Cuts the discharge time series to full water years

View source: R/cut_dataToWaterYear.R

cut_dataToWaterYearR Documentation

Cuts the discharge time series to full water years

Description

Cuts the discharge time series to full water years

Usage

cut_dataToWaterYear(x, yearType, wyMonth = 10L)

Arguments

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.

Details

To ensure the input data is valid for use with other EflowStats functions. #'

  1. First column must be of class 'Date'.

  2. Second must be of class 'numeric'.

  3. 'yearType' input must be either "water" or "calendar".

  4. 'wyMonth'input must be of class 'integer'.

Value

data.frame in original structure, but cut to full water years

Examples

x <- sampleData[, c('date', 'discharge')]
cut_dataToWaterYear(x,10L)

USGS-R/EflowStats documentation built on Sept. 30, 2023, 9:31 p.m.