Description Usage Arguments Examples
This function creates nicely formatted, standardised decile plots. Prior to calling the function the data should only be in a form of a decile table (calculate_decile_table() function will do that for you).
1 2 3 4 5 |
df |
A data frame |
x |
A categorical variable for the x axis groupings. Defaults to 'decile' |
y |
A numerical variable for the y axis levels. Defaults to 'bad_rate' |
facet |
Select an additional faceting variable to create facets. Defaults to NULL |
ticks |
Select the number of ticks on the y axis. Defaults to 10 |
angle |
Select the rotation angle for the x axis labels. Defaults to 0 |
title |
Should the plot title appear automatically. Defaults to TRUE |
subtitle |
Text that is displayed on the subtitle. Defaults to NULL |
caption |
Text that is displayed on the caption. Defaults to NULL |
lab_x |
Text that is displayed on the x axis. Defaults to "Decile" |
lab_y |
Text that is displayed on the y axis. Defaults to "Value range" |
legend |
Should the plot legend appear automatically. Defaults to TRUE |
alpha |
Select plot fill transparency. Defaults to .7 |
quantile_low |
Select lower percentile for outliers exclusion. Defaults to 2.5% |
quantile_high |
Select upper percentile for outliers exclusion. Defaults to 97.5% |
palette |
Select a color palette from colors available in the select_palette function |
theme_type |
Select a theme type from themes available in the aider_theme function |
1 2 3 4 5 6 | recipes::credit_data %>%
first_to_lower() %>%
calculate_decile_table(binning = age,
grouping = status,
top_level = "bad") %>%
plot_deciles()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.