rbin_quantiles: Quantile binning

Description Usage Arguments Value Examples

View source: R/rbin-quantile.R View source: R/rbin-quantile.R

Description

Bin continuous data using quantiles.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
rbin_quantiles(
  data = NULL,
  response = NULL,
  predictor = NULL,
  bins = 10,
  include_na = TRUE
)

## S3 method for class 'rbin_quantiles'
plot(x, print_plot = TRUE, ...)

Arguments

data

A data.frame or tibble.

response

Response variable.

predictor

Predictor variable.

bins

Number of bins.

include_na

logical; if TRUE, a separate bin is created for missing values.

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

1
2
3
4
5
bins <- rbin_quantiles(mbank, y, age, 10)
bins

# plot
plot(bins)

rbin documentation built on July 8, 2020, 7:31 p.m.