climateYear | R Documentation |
Create an ordered factor or numeric values from a vector of dates based on the climate year.
climateYear(x, numeric = FALSE)
x |
an object of class "Date" or "POSIXt." Missing values are permitted and reesult in corresponding missing values in the output. |
numeric |
a logical value that indicates whether the returned values
should be numeric |
An ordered factor or numeric vector corresponding to the climate year.
The climate year is defined as the period from April 1 to March 30. The climate year is designated by the calendar year in which it ends. Thus, the year ending March 30, 1999, is the "1999 climate year."
year
, waterYear
library(smwrData) data(QW05078470) ## Return an ordered factor climateYear(QW05078470$DATES)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.