gen_rolling_mean: Calculate rolling mean of a generic column in a dataframe...

Description Usage Arguments Value

View source: R/gen_rolling_mean.R

Description

Takes a subset of a dataframe that represents a single experiment as input and calculates a rolling mean on the data with binwidth k.

Usage

1
2
gen_rolling_mean(dat, data.column, time.column = timepoint, k = "auto",
  k_val = 0.05, jitter_factor = 0, align = "center")

Arguments

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

Value

a dataframe with columns "Time" and "fit" representing the rolling mean at each timepoint.


ctriandafillou/cat.extras documentation built on Aug. 27, 2020, 11:04 p.m.