chop(1:10, c(2, 5, 8), lbl_endpoints(left = TRUE))
chop(1:10, c(2, 5, 8), lbl_endpoints(left = FALSE))
if (requireNamespace("lubridate")) {
tab_width(
as.Date("2000-01-01") + 0:365,
months(1),
labels = lbl_endpoints(fmt = "%b")
)
}
if (FALSE) {
# This gives breaks `[1, 2) [2, 3) {3}` which lead to
# duplicate labels `"2", "3", "3"`:
chop(1:3, 1:3, lbl_endpoints(left = FALSE))
}
Run the code above in your browser using DataLab