Description Usage Arguments Note
Function that can compute various measures (e.g mean, SD, max...) of one or several variable (computedVariables) grouped on a sliding window running across another base variable of optional size sizeOfWindow, or with number of bin numberOfBins
1 2 3 |
data |
: dataframe or data.table containing the variables |
computedVariables |
: vector of character representing the name of the columns in the data |
baseVariable |
: character representing the name of the columns of the base variable upon which the window is sliding |
computedFunction |
: either a character ("mean") or a function (mean) specifying the computation you want to use. If computedFunction is a vector, the function will compute for all variables iteratively |
groupBy |
: optional - if set, compute grouped by variable "groupBy" and add a column named with the name of that variable to the output DT |
sizeOfWindow |
(optional) : numeric valuein the metric of the base variable defining the size of the sliding window |
... |
(optional) : the rest of the arguments are to be passed to the computedFunction when it is called (eg na.rm=T) |
step(optional) |
: numeric value in the metric of the base variable definig how much the windows moves at each step if the step is smaller than sizeOfWindow, overlap value will be generated |
DevStatus: one pass - utility 5/5 TODO(Albert): make example
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.