Description Usage Arguments Details Value Author(s) References See Also Examples
Compute a number of statistics like mean, minimum or maximum of a
vector (typically a time series) on a shifting window. The function
emphasises efficiency; potential problems (like NA
values)
should be checked before.
1 |
what |
a character vector: "mean", "min" or "max" (‘sum’, ‘abssum’ and others will be added) |
y |
a numeric vector |
N |
an integer |
pad |
replace elements 1 to |
q |
a quantile (not implemented) |
h |
the order statistic for a quantile (not implemented) |
All algorithms are written in C
. There is no error handling,
and no handling of NA
, Inf
or similar values (if such
values are in y
, runStats will stop with an error).
For quantiles either h
or q
must be specified, not both.
A numeric vector of length length(y)
.
Enrico Schumann
Gilli, M., Maringer, D. and Schumann, E. (2011) Numerical Methods and Optimization in Finance. Elsevier. http://www.elsevierdirect.com/product.jsp?isbn=9780123756626
A number of packages already include such computations. See, for examples, packages caTools, zoo or TTR.
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.