Skip to contents

Print diagnostic tables or draw a histogram, cumulative distribution, or candidate bin counts using base R graphics.

Usage

# S3 method for class 'bin_diagnosis'
print(x, digits = 4L, ...)
# S3 method for class 'bin_diagnosis'
plot(x, type = c("histogram", "ecdf", "bins"),
  main = NULL, ...)

Arguments

x

An object returned by bin_diagnose().

digits

Significant digits in printed tables.

type

Plot type. The histogram shows all finite values, including zeros. The ECDF shows the proportion at or below each value. Bin-count bars include empty bins and a separate zero category when requested.

main

Optional title.

...

Additional arguments to the underlying graphics function, such as breaks for histogram resolution or xlim for a display range. Do not override the supplied xlab, ylab, col, border, or names.arg arguments. Unused by the print method.

Details

Histograms default to observation counts, including when display breaks are unequal. Use freq = FALSE to request density instead. Dashed lines mark internal candidate interval boundaries in histograms and ECDF plots. Histogram bars are display bins, not the candidate categories. Use type = "bins" to see counts of candidate categories. A separate zero category is shown only in the bin-count plot; zeros remain included in histograms and ECDFs. Orange count bars flag the user-set sparse-bin rules.

Value

The input object, invisibly. Plots are drawn to the active graphics device.

See also