seas: Create columns indicating wet/dry season and water year

View source: R/seas.R

seasR Documentation

Create columns indicating wet/dry season and water year

Description

Federal water year 2022 runs from 01 Oct 2021 - 30 Sept 2022 (beginning with the dry season). Florida water year 2022 runs from 01 May 2021 - 30 April 2022 (beginning with the wet season).

Usage

seas(
  inputData,
  timeCol = "datetime",
  wetSeas = c("May", "Sep"),
  waterYearBegin = month.abb[which(month.abb %in% wetSeas[2]) + 1]
)

Arguments

inputData

input dataframe

timeCol

POSIXct column of timestamps

wetSeas

the first and last month of the wet season (inclusive; use abbreviated months as in month.abb)

waterYearBegin

the first full month of each water year (abbreviated form, as in month.abb, e.g., "Oct"). Default behavior is consistent with the federal water year, where a new WY begins at the start of the dry season (Oct).

Value

two columns are appended to the input dataframe

Examples

a <- seas(head(wqDat), timeCol = "datetime")
head(a)


troyhill/SFNRC documentation built on Dec. 30, 2024, 4:32 p.m.