get_waterYear: Function to return the water year for a given date

View source: R/get_waterYear.R

get_waterYearR Documentation

Function to return the water year for a given date

Description

Function to return the water year for a given date

Usage

get_waterYear(x, wyMonth = 10L, numeric = TRUE)

Arguments

x

A date vector

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.

numeric

Logical. Return values are numeric vector or vector of ordered factors

Value

A vector of numeric water years for each date if numeric = TRUE otherwise an ordered factor of water years if numeric = FALSE

Examples

get_waterYear(sampleData$date)


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