get_cv | R Documentation |
Calculates coefficient of variation using static or sliding methods, with potential for custom methods as well
cv_2rm( x, window_size = 10, approach = c("sliding", "static", "custom"), verbose = FALSE, ... ) static_cv(x, window_size) sliding_cv(x, window_size) custom_cv(x, window_size, pad_size = window_size - 1, ...)
x |
a numeric vector on which to perform the calculation |
window_size |
width of the sliding window, in data points |
approach |
character scalar naming the desired calculation approach to
use. Can be |
verbose |
logical. Print progress updates? |
... |
arguments passed to functions in the |
pad_size |
The number of NA values to append at the start and end of
|
For approach == "sliding"
, the value for each epoch
represents the lowest CV value of all the sliding windows that overlap with
that epoch. For aproach == "static"
, a truncated vector of CV values
is given, which reflects CV values from a non-overlapping sliding window.
For approach == "custom"
, users can pass arguments into
RcppRoll
functions and create a variation on the sliding approach.
Behavior of this feature is not well documented and subject to change if
people start using it and requesting specific behavior.
a numeric vector of values, giving the desired coefficient of variation
Crouter et al. (2010, Med Sci Sports Exerc) Crouter et al. (2006, J Appl Physiol)
data(raw_for_cv) cv_2rm(raw_for_cv$ENMO)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.