bi_class_breaks {biscale} | R Documentation |
This function can be used to return a list containing vectors
of either the ranges of values included in each category of x
and y
or, alternatively, the individual break values including
the minimum and maximum values. This function supports simplified
reporting as well as more descriptive legends.
bi_class_breaks(.data, x, y, style, dim = 3, clean_levels = TRUE,
dig_lab = 3, split = FALSE)
.data |
A data frame, tibble, or |
x |
The |
y |
The |
style |
A string identifying the style used to calculate breaks. Currently
supported styles are |
dim |
The dimensions of the palette. To use the built-in palettes,
this value must be either If you are using a custom palette, this value may be larger (though these maps can be very hard to interpret). If you are using pre-made factors, both factors must have the same number of levels as this value. |
clean_levels |
A logical scalar; if |
dig_lab |
An integer that is passed to |
split |
A logical scalar; if |
A list where bi_x
is a vector containing the breaks for the
x
variable and bi_y
is a vector containing the breaks for
the y
variable.
# return ranges for each category of x and y
bi_class_breaks(stl_race_income, style = "quantile", x = pctWhite, y = medInc,
dim = 4, dig_lab = c(4, 5), split = FALSE)
# ranges can be returned with brackets and parentheses
bi_class_breaks(stl_race_income, style = "quantile", x = pctWhite, y = medInc,
clean_levels = FALSE, dim = 4, dig_lab = 3, split = FALSE)
# return breaks for each category of x and y
bi_class_breaks(stl_race_income, style = "quantile", x = pctWhite, y = medInc,
dim = 4, dig_lab = c(4, 5), split = TRUE)
# optionally name vector for dig_lab for increased clarity of code
bi_class_breaks(stl_race_income, style = "quantile", x = pctWhite, y = medInc,
dim = 4, dig_lab = c(x = 4, y = 5), split = TRUE)
# scalars can also be used for dig_lab, though results may be less optimal
bi_class_breaks(stl_race_income, style = "quantile", x = pctWhite, y = medInc,
dim = 4, dig_lab = 3, split = TRUE)