date_to_wyd | R Documentation |
Converts a date (inputs of year, calendar-year day) to water-year day
date_to_wyd(cy, cyd, wyd_start = 274)
cy |
Calendar year |
cyd |
Calendar-year day. January 1 is equal to 1. Can be obtained from date_to_cyd function. |
wyd_start |
Calendar-year day to start water-year day (Default 274 is October 1) |
Accounts for leap years (but not the skipping of leap years at every century except those divisible by 400 (e.g. year 2000))
Tip: Function requires purrr:pmap_dbl or mapply
purrr::pmap_dbl(list(cy, cyd, wyd_start=274), date_to_wyd)
mapply(date_to_wyd, cy, cyd, wyd_start)
Ryan Bart
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.