makeWaterYear {MGBT} | R Documentation |
Make Water Year Column
Description
Make water year, year, month, and day columns from the date stamp of a U.S. Geological Survey peak-streamflow data retrieval from the National Water Information System (NWIS) (U.S. Geological Survey, 2019) in an R data.frame
into separate columns of the input data.frame
.
Usage
makeWaterYear(x)
Arguments
x |
A |
Value
The x
is returned with the addition of these columns:
year_va |
The calendar year extracted from |
month_va |
The optional month extracted from |
day_va |
The optional day extracted from |
water_yr |
The water year, which is not equal to |
Author(s)
W.H. Asquith
References
U.S. Geological Survey, 2019, USGS water data for the Nation: U.S. Geological Survey National Water Information System database, accessed October 11, 2019, at doi: 10.5066/F7P55KJN.
See Also
Examples
# The dataRetrieval package is not required by MGBT algorithms.
PK <- dataRetrieval::readNWISpeak("08167000", convertType=FALSE)
PK <- makeWaterYear(PK) # Note: The convertType=FALSE is critical.
names(PK) # See that the columns are there.