Description Usage Arguments Value Examples
Create two-sided labels from a sequence of values
1 | label_breaks(breaks, exclusive = FALSE, add_Inf = TRUE, replace_Inf = TRUE)
|
breaks |
a vector with break values ( |
exclusive |
logical, indicating whether the right side of the label should display a mutually exclusive value with the left side of the following label. If FALSE (default), the labels display not mutually exclusive values (i.e. "1-10", 10-100", etc.). If TRUE the labels display mutually exclusive values (i.e. "1-9", 10-99", etc.). |
add_Inf |
logical, if TRUE (default), and if not already present, the value |
replace_Inf |
logical, if TRUE (default) the value |
a vector of the same length of the input vector of length of the input vector - 1 if add_Inf
is set as FALSE.
1 2 3 4 5 6 7 8 9 | x <- c(1, 10, 100, Inf)
label_breaks(x)
label_breaks(x, exclusive = TRUE)
label_breaks(x, exclusive = FALSE, replace_Inf = TRUE)
y <- c(1, 10, 100)
label_breaks(y)
label_breaks(y, exclusive = TRUE) # same length of input vector
label_breaks(y, exclusive = FALSE, add_Inf = FALSE) # length of input vector - 1
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.