Skip to contents



lbl_manual(sequence, fmt = "%s")



A character vector of labels.


String, list or function. A format for break endpoints.


A function that creates a vector of labels.


lbl_manual() is deprecated because it is little used and is not closely related to the rest of the package. It also risks mislabelling intervals, e.g. if intervals are extended.

lbl_manual() uses an arbitrary sequence to label intervals. If the sequence is too short, it will be pasted with itself and repeated.

Formatting endpoints

If fmt is not NULL then it is used to format the endpoints.

  • If fmt is a string, then numeric endpoints will be formatted by sprintf(fmt, breaks); other endpoints, e.g. Date objects, will be formatted by format(breaks, fmt).

  • If fmt is a list, then it will be used as arguments to format.

  • If fmt is a function, it should take a vector of numbers (or other objects that can be used as breaks) and return a character vector. It may be helpful to use functions from the {scales} package, e.g. scales::label_comma().

See also

Other labelling functions: lbl_dash(), lbl_discrete(), lbl_endpoints(), lbl_glue(), lbl_intervals(), lbl_midpoints(), lbl_seq()


chop(1:10, c(2, 5, 8), lbl_manual(c("w", "x", "y", "z")))
#> Warning: `lbl_manual()` was deprecated in santoku 0.9.0.
#>  Just specify `labels = sequence` instead.
#>  [1] w x x x y y y z z z
#> Levels: w x y z
# ->
chop(1:10, c(2, 5, 8), labels = c("w", "x", "y", "z"))
#>  [1] w x x x y y y z z z
#> Levels: w x y z