| MovingWindowFunctions | R Documentation |
These functions use a moving window to smooth data
moving_average(
formula = NULL,
data = NULL,
x = NULL,
y = NULL,
window_width_n = NULL,
window_width = NULL,
window_width_n_frac = NULL,
window_width_frac = NULL,
na.rm = TRUE,
warn_nonnumeric_sort = TRUE
)
moving_median(
formula = NULL,
data = NULL,
x = NULL,
y = NULL,
window_width_n = NULL,
window_width = NULL,
window_width_n_frac = NULL,
window_width_frac = NULL,
na.rm = TRUE,
warn_nonnumeric_sort = TRUE
)
formula |
Formula specifying the |
data |
|
x |
A |
y |
A |
window_width_n |
Number of data points wide the moving window is (therefore, must be an odd number of points) |
window_width |
Width of the moving window (in units of |
window_width_n_frac |
Width of the window (as a fraction of the total number of data points). |
window_width_frac |
Width of the window (as a fraction of the range of
|
na.rm |
|
warn_nonnumeric_sort |
|
Either x and y or formula and data
must be provided.
Values of NULL or NA will be ignored for any of
window_width_n, window_width,
window_width_n_frac, or window_width_frac
vector of smoothed data, with NA's appended at both ends
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.