calculate_rates: Calculate rates of change

Description Usage Arguments Value

View source: R/calculate_rates.R

Description

Given a data frame with a "lake", "date", and "level" columns as well as a vector of desired lag (e.g., 1 month, 3 months, 12 months), calculates the change in lake levels over each time period.

Usage

1
calculate_rates(df, months = c(1, 3, 12))

Arguments

df

a data frame with a "lake" and a "level" column

months

a vector with all lag times (in months) to consider, defaults to c(1, 3, 12).

Value

rates, a data frame with the following columns:

lake

name of lake

variable

number of months lagged (e.g., 1, 3, 12)

value

change in lake levels over given time period


WDNR-Water-Use/CSLSscenarios documentation built on Nov. 10, 2021, 4:14 p.m.