tbr_gmean | R Documentation |
Produces a a rolling time-window based vector of geometric means and confidence intervals.
tbr_gmean(.tbl, x, tcolumn, unit = "years", n, ...)
.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 geometric mean. |
tcolumn |
formatted time column. |
unit |
character, one of "years", "months", "weeks", "days", "hours", "minutes", "seconds" |
n |
numeric, describing the length of the time window. |
... |
additional arguments passed to |
tibble with columns for the rolling geometric mean and upper and lower confidence levels.
gm_mean_ci
## Return a tibble with new rolling geometric mean column
tbr_gmean(Dissolved_Oxygen, x = Average_DO, tcolumn = Date, unit = "years", n = 5)
## Not run:
## Return a tibble with rolling geometric mean and 95% CI
tbr_gmean(Dissolved_Oxygen, x = Average_DO, tcolumn = Date, unit = "years", n = 5, conf = .95)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.