Skip to content

Add outlier_label parameter to auto_bin() #1

@truenomad

Description

@truenomad

Current behavior

auto_bin() accepts outlier_color to style the outlier bin, but the outlier label is auto-generated (e.g. >1.00). There is no way to customize it.

Request

Add an outlier_label parameter so users can override the default label text. The default should remain the current auto-generated format.

Updated signature:

auto_bin(
  x,
  palette = "default",
  bin = 6,
  decimals = 2,
  round_to = 50,
  reverse = FALSE,
  labels = NULL,
  outlier_threshold = NULL,
  outlier_color = "#636363",
  outlier_label = NULL
)

When outlier_label = NULL (default), keep the current auto-generated label. When a string is provided, use it as the bin label.

Checklist

  • Add outlier_label parameter to auto_bin() in R/auto_bin.R
  • Update roxygen docs (@param, @examples)
  • Add/update tests in tests/testthat/test-auto_bin.R for the new parameter
  • Run devtools::document() to regenerate man/ and NAMESPACE
  • Run devtools::test() — all tests pass
  • Run devtools::check() — no errors, warnings, or notes

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions