ch_wtr_yr: Designation of the water year

View source: R/ch_wtr-yr.R

ch_wtr_yrR Documentation

Designation of the water year

Description

Display water year

Usage

ch_wtr_yr(dates, start_month = 10)

Arguments

dates

A vector of dates with actual year

start_month

Month in which the year starts (defaults to October)

Value

Year starting in start_month

Source

http://stackoverflow.com/questions/27626533/r-create-function-to-add-water-year-column

Examples

date <- seq(as.Date("1910/1/1"), as.Date("1912/1/1"), "days")
wtr_yr_date <- ch_wtr_yr(dates=date, start_month=10)
data.frame(wtr_yr_date, date)

CSHS-hydRology/CSHShydRology documentation built on Aug. 18, 2022, 4:44 p.m.