Learn R Programming

hydroState (version 0.2.0.0)

get.seasons: Get seasons

Description

Aggregates monthly data to 4 seasons in a year.

Usage

get.seasons(
  input.data = data.frame(year = c(), month = c(), flow = c(), precip = c())
)

Value

A dataframe of seasonal observations with an additional column counting the number of months in each season.

Arguments

input.data

dataframe of monthly runoff and precipitation observations. Gaps with missing data in either streamflow or precipitation are permitted, and the handling of them is further discussed in build. Monthly data is required when using seasonal.parameters that assumes selected model parameters are better defined with a sinusoidal function.

Details

get.seasons

This function takes sums monthly runoff and precipitation observations into 4 seasons of a year.

Examples

Run this code

# Load data
data(streamflow_monthly_221201)

# aggregate monthly data to seasonal
streamflow_seasonal_221201 = get.seasons(streamflow_monthly_221201)


Run the code above in your browser using DataLab