ch_doys {CSHShydRology} | R Documentation |
Converts an array of dates into a dataframe with date, year, month, doy, wyear, dowy.
The day of water year is computed from the first of the specified water year month.
ch_doys(Date, water_yr = 10)
Date |
an array of R dates, as produced by |
water_yr |
the month starting the water year, default is 10 (October). If
a value of |
Converts a date array into a data frame with years, wateryears, and days of year and of water year.
Returns a dataframe with date information:
Date |
in Date format |
year |
numeric calendar year |
month |
number calendar month |
doy |
numeric day of year |
wyear |
numeric water year starting on day 1 of selected month |
dwy |
numeric day of water year |
Paul Whitfield, Kevin Shook
dd <- seq.Date(as.Date("2010-01-01"), as.Date("2018-01-01"),by = 1)
output <- ch_doys(dd, water_yr=10)
head(output)