We define an intervals vector to always start with 0, and contain unique ordered time points.
assert_intervals(x, y)
what to check.
(count
)
required length of y
.
Raises an error if x
is not an intervals vector starting with 0.
assert_intervals(c(0, 5, 7), 3)