Description Usage Arguments Details Value Examples
winScan() applies a list of functions to each of a list of variables, using
a sliding window approach. This can be a "rolling" window or a "position" window (see details).
If required, the windows can be defined independently for one or more grouping variables.
.winSlider() is an internal function called by winScan().
It creates sliding window coordinates and applies a list of
functions to each window.
.winStats() is an internal function called by mclapply()
in .winSlide().
1 2 3 4 5 6 7 8 9 |
x |
a data.frame object on which to calculate window statistics. |
... |
other arguments passed to specific methods. |
groups |
vector with the name of variables on which to group the data.frame. It can be set to NULL, if there are no groups. Default: NULL |
position |
name of variable which contains the positions on which to calculate the windows. If set to NULL, a "rolling" window will be computed instead. Default: NULL |
values |
vector of variables on which to calculate statistics. |
win_size |
size of the window. |
win_step |
step of the window. Default: 0.5*win_size. |
funs |
vector of functions to compute for each window. Default: "mean". |
cores |
number of processing cores. |
x |
data.frame on which to calculate window statistics. |
A "rolling" window is based on consecutive rows in the data.frame. For example, if
'win_size = 10' and 'win_step = 5', then, on a data.frame with 100 rows there will be
20 windows, each containing 10 rows of the data.frame.
A "position" window is based on a variable containing positions.
a data.frame of window-computed statistics.
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.