water_day: Get water day component of datetime(s)

Description Usage Arguments Value Examples

Description

A water day is the number of days past the start of a water year beginning with 1. For example, if a water year is defined as starting in October, then the water day for 2007-09-30 is 365, 2007-10-01 is 1, 2007-10-02 is 2, etc.

Usage

1
water_day(x, start_month = 10)

Arguments

x

vector of datetime objects

start_month

integer specifying first month of water year (default = 10 for October)

Value

vector of water days as decimal numbers

Examples

1
2
x <- seq.Date(from = as.Date("2007-09-30"), to = as.Date("2007-10-02"), by = "day"))
water_day(x)

walkerjeffd/walkerenvres documentation built on May 3, 2019, 10:46 p.m.