Description Usage Arguments Value
View source: R/gen_rolling_mean.R
Takes a subset of a dataframe that represents a single experiment as input and calculates a rolling mean on the data with binwidth k.
1 2 | gen_rolling_mean(dat, data.column, time.column = timepoint, k = "auto",
k_val = 0.05, jitter_factor = 0, align = "center")
|
dat |
A dataframe or dataframe subset to act on. |
data.column |
a string representing the name of the column containing the timeseries observations |
time.column |
a string representing the name of the column containing the time; default is "timepoint" |
k |
Indicates method to use for binwidth. If k is an integer, this will be the number of samples to include in the averaging bin. If k is "auto", the binwidth will be determined for each subset individually, size will be determined by k_val |
k_val |
Only used if k = "auto"; the percentage of the total number of observations that will be averaged over for each subset |
a dataframe with columns "Time" and "fit" representing the rolling mean at each timepoint.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.