It creates dataframes to be used in coplot

make_coplot_df(df, vble, number_bins = 6, overlap = 0.5, equal_length = TRUE)

Arguments

df

dataframe

vble

faceting numeric variable

number_bins

integer; the number of conditioning intervals

overlap

numeric < 1; the fraction of overlap of the conditioning variables

equal_length

if `overlap = 0` non overlaping intervals are produced all with same length if `equal_length` is `TRUE` (default) or with the same number of values otherwise.

Value

a dataset to be used in the creation of coplots

Details

Adapted from here.

If `overlap = 0` then `ggplot2::cut_interval` is used to generate the intervals if `equal_length = TRUE` (default), otherwise `ggplot2::cut_number` is used. If `overlap` is not zero, `graphics::co.interval` is called.

Examples

data_coplot <- make_coplot_df(rubber, hardness, 6, 3/4)