View source: R/utility_functions.R
label_cycles | R Documentation |
Given a data series, break into cycles (at each trough) break each cycle into load (trough -> peak) and unload (peak -> trough) segments, using turning points from peaksign. As tests start at a trough and go to a peak, the testing direction is found by checking sign of the first peak/trough.
label_cycles(series, span = 5)
series |
the list/vector of data to search for peaks. |
span |
size of window to use when looking for peaks. Defaults to 3. Larger spans are less sensitive to noise, but effectively smooth the series. |
a list of cycle numbers cycle = 1:n.cycles and segments seg = rep(c("load","unload")) both padded to the length of the original series
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.