hole() creates a <phinterval> vector where each element is a hole (an
empty set of time spans).
Details
A hole is a phinterval element with zero time spans, representing an empty interval. Holes are useful as placeholders or for representing the absence of time periods in interval algebra operations.
Examples
# Create a single hole
hole()
#> <phinterval<local>[1]>
#> [1] <hole>
# Create multiple holes
hole(3)
#> <phinterval<local>[3]>
#> [1] <hole> <hole> <hole>
# Specify time zone
hole(tzone = "UTC")
#> <phinterval<UTC>[1]>
#> [1] <hole>
# Holes can be combined with other phintervals
jan <- phinterval(as.Date("2000-01-01"), as.Date("2000-02-01"))
c(jan, hole(), jan)
#> <phinterval<UTC>[3]>
#> [1] {2000-01-01--2000-02-01} <hole> {2000-01-01--2000-02-01}
