Different validation checks for sequence of timestamps
isValidTimestampSequence( timestamps, checks = c("sorted", "duplicates", "timestep"), dbg = FALSE )
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? |
timestamps <- sequenceOfTimestamps("2017-11-03", "2017-11-04", 3600) times <- as.POSIXct(timestamps) isValidTimestampSequence(times)#> [1] TRUE#> Warning: #> *** The timestamps are not sorted!#> [1] FALSE#> Warning: #> *** The time step between timestamps is not unique: 0, 3600 (secs) #> #> *** The timestamps contain 1 duplicates such as: #> '2017-11-03 00:00:00'#> [1] FALSE