Description Usage Arguments Value Examples
Apply a function on an expanding window.
1 | expand_apply(x, FUN)
|
x |
a numeric vector (NA is allowed and will be omitted) or a data.frame/rwl object |
FUN |
character, name of a function e.g. 'median'. |
... |
additional arguments |
The form of the value depends on the class of x. returns a vector for default method, a data.frame for data.frame method.
1 2 3 4 5 6 7 | #example for numeric method:
x <- c(NA, NA, 1, 3, 2, 3, NA)
expand_apply(x, 'median')
#example for data.frame method:
library('dplR')
data('ca533')
expand_apply(ca533, 'median')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.