wtr_yr: Designation of the water year

Description Usage Arguments Value Source Examples

Description

Display water year

Usage

1
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

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

boshek/samfunr documentation built on May 13, 2019, 12:37 a.m.