hydroYear | R Documentation |
Calculates the hydrological year, based on the starting month.
hydroYear(CRHMdata, startMonth = 10, useSecondYear = TRUE, logfile = "")
CRHMdata |
Required. A CRHMr data frame. |
startMonth |
Optional. The starting month for the hydrological year. Default is
|
useSecondYear |
Optional. Logical. Determines if the hydrological year is based on
the first or second calendar year. In other words would the hydrological year for
January 1, 2015 be 2014 or 2015? The default is |
logfile |
Optional. Name of the file to be used for logging the action. Normally not used. |
If successful, returns the hydrological year as a vector. If unsuccessful, returns an error.
Kevin Shook. Inspired by a function by Chris Marsh.
aggDataframe
# create a new data frame, then add the hydro year
BadLake <- BadLake7376
BadLake$hydroyear <- hydroYear(BadLake, startMonth = 9)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.