isValidTimestampSequence: Check Sequence of Timestamps for Validity

Description Usage Arguments Examples

View source: R/step.R

Description

Different validation checks for sequence of timestamps

Usage

1
2
3
4
5
isValidTimestampSequence(
  timestamps,
  checks = c("sorted", "duplicates", "timestep"),
  dbg = FALSE
)

Arguments

timestamps

vector of timestamps of class POSIXt

checks

Vector of character indicating the checks to be performed. Available checks: "sorted", "duplicates", "timestep". Default: perform all tests

dbg

shall debug messages be shown?

Examples

1
2
3
4
5
timestamps <- sequenceOfTimestamps("2017-11-03", "2017-11-04", 3600)
times <- as.POSIXct(timestamps)
isValidTimestampSequence(times)
isValidTimestampSequence(rev(times))
isValidTimestampSequence(timestamps = c(times[1], times))

KWB-R/kwb.datetime documentation built on July 9, 2021, 10:28 p.m.