Learn R Programming

rbin (version 0.2.0)

rbin_equal_freq: Equal frequency binning

Description

Bin continuous data using the equal frequency binning method.

Usage

rbin_equal_freq(data = NULL, response = NULL, predictor = NULL, bins = 10)

# S3 method for rbin_equal_freq plot(x, print_plot = TRUE, ...)

Arguments

data

A data.frame or tibble.

response

Response variable.

predictor

Predictor variable.

bins

Number of bins.

x

An object of class rbin_quantiles.

print_plot

logical; if TRUE, prints the plot else returns a plot object.

...

further arguments passed to or from other methods.

Value

A tibble.

Examples

Run this code
# NOT RUN {
bins <- rbin_equal_freq(mbank, y, age, 10)
bins

# plot
plot(bins)

# }

Run the code above in your browser using DataLab