ch_wtr_yr {CSHShydRology}R 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)
df <- data.frame(wtr_yr_date, date)

[Package CSHShydRology version 1.3.0 Index]