get_epoch_length: Guess the epoch length (in seconds) from the timestamp column

View source: R/utils.R

get_epoch_lengthR Documentation

Guess the epoch length (in seconds) from the timestamp column

Description

Guess the epoch length (in seconds) from the timestamp column

Usage

get_epoch_length(epochs)

Arguments

epochs

A tibble with at least one column, timestamp, which contains POSIXct objects.

Value

The epoch length in seconds, inferred from the spacing between consecutive timestamps. Throws an error if the time points are not equally spaced.

Examples

data("gtxplus1day")

gtxplus1day %>%
  get_epoch_length()

gtxplus1day %>%
  collapse_epochs(60) %>%
  get_epoch_length()

actigraph.sleepr documentation built on Sept. 12, 2026, 5:08 p.m.