This function marks duplicate timestamps in the input vector.

detect_duplicates(timestamps)

Arguments

timestamps

timestamp vector of type Date or POSIXct

Value

Logical vector with same length as x, specifying TRUE for a duplicate value.

Examples

# In case of a vector: ts <- seq(as.Date('2019-01-01'), as.Date('2019-01-5'), by = 'day') ts <- c(ts, as.Date('2019-01-5')) detect_duplicates(ts)
#> [1] FALSE FALSE FALSE FALSE FALSE TRUE