find_epoch | R Documentation |
tsibble
find_epoch()
returns the different epochs/periodicities present in a
tsibble
object along with a best match epoch based
on a predefined threshold.
find_epoch(data, threshold = 0.9)
data |
A tsibble object with a |
threshold |
(optional) a number, from |
In the rare cases that a tsibble
object have
periodicities with the same prevalence above the threshold, best_match
will
return just one of those values.
A list
object with the following elements:
best_match
: A number indicating the epoch/periodicity above the
threshold
with greater prevalence in seconds. If none is find, best_match
value will be equal as as.numeric(NA)
.
prevalence
: a tibble
listing the unique
epochs/periodicities found in data
along with its proportions.
Other utility functions:
aggregate_index()
,
raw_data()
,
read_acttrust()
,
write_acttrust()
data <- dplyr::tibble(
index = c(
as.POSIXct(seq(60, 5400, by = 60), origin = lubridate::origin),
as.POSIXct(seq(5430, 5490, by = 30), origin = lubridate::origin),
as.POSIXct(seq(5505, 5520, by = 15), origin = lubridate::origin),
as.POSIXct(seq(5530, 5540, by = 10), origin = lubridate::origin),
as.POSIXct(seq(5545, 5555, by = 5), origin = lubridate::origin)
),
x = seq_along(timestamp)
)
data <- tsibble::tsibble(data, index = index)
find_epoch(data, 0.8)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.