expand_timestamp: Expand a time period into a vector of equally spaced time...

View source: R/utils.R

expand_timestampR Documentation

Expand a time period into a vector of equally spaced time points

Description

Given the start time and the end time of a period, expand it into a vector of equally spaced time points.

Usage

expand_timestamp(start, end, units = "1 min")

Arguments

start

The start time, as a POSIXct object.

end

The end time, as a POSIXct object.

units

The time unit as a characters string. The default is "1 min".

Value

A POSIXct vector of equally spaced time points starting at start, ending no later than end, and separated by units.

Examples

start <- as.POSIXct("2017-01-01")
end <- as.POSIXct("2017-01-01 01:00:00")
expand_timestamp(start, end, "15 mins")

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