Learn R Programming

timefully (version 0.1.0)

get_time_resolution: Return the time resolution of a datetime sequence

Description

Return the time resolution of a datetime sequence

Usage

get_time_resolution(dttm_seq, units = "mins")

Value

numeric

Arguments

dttm_seq

datetime sequence

units

character being one of "auto", "secs", "mins", "hours", "days" and "weeks"

Examples

Run this code
seq_15m <- as.POSIXct(
  c("2024-01-01 00:00:00", "2024-01-01 00:15:00", "2024-01-01 00:30:00"),
  tz = "UTC"
)
get_time_resolution(seq_15m, units = "mins")

Run the code above in your browser using DataLab