View source: R/utility_functions.R
segs_from_peaks | R Documentation |
Create a list of load/unload segment labels,
given a list of turning points found using peaksign
the first segment is assumed to be "load", followed by "unload" etc.
The output can be used for grouping a data.table
by segment
segs_from_peaks(peaks)
peaks |
the list of turning points from peaksign |
list of seg = c("load","unload") 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.