tbr_sd: Time-Based Rolling Standard Deviation

View source: R/tbr_sd.R

tbr_sdR Documentation

Time-Based Rolling Standard Deviation

Description

Time-Based Rolling Standard Deviation

Usage

tbr_sd(.tbl, x, tcolumn, unit = "years", n, na.rm = FALSE)

Arguments

.tbl

a data frame with at least two variables; time column formatted as date, date/time and value column.

x

column containing the values to calculate the standard deviation.

tcolumn

formatted time column.

unit

character, one of "years", "months", "weeks", "days", "hours", "minutes", "seconds"

n

numeric, describing the length of the time window.

na.rm

logical. Should missing values be removed?

Value

tibble with column for the rolling sd.

See Also

sd

Examples

tbr_sd(Dissolved_Oxygen, x = Average_DO, tcolumn = Date, unit = "years", n = 5)

mps9506/tbrf documentation built on May 20, 2022, 10:49 a.m.