powered by
Use Generic Functions with Time Windows
tbr_misc(.tbl, x, tcolumn, unit = "years", n, func, ...)
tibble
a data frame with at least two variables; time column formatted as date, date/time and value column.
column containing the values the function is applied to.
formatted time column.
character, one of "years", "months", "weeks", "days", "hours", "minutes", "seconds"
numeric, describing the length of the time window.
specified function
optional additional arguments passed to function func
func
tbr_misc(Dissolved_Oxygen, x = Average_DO, tcolumn = Date, unit = "years", n = 5, func = mean)
Run the code above in your browser using DataLab