Calculate the max density in a gg_density_col(..., position == "identity") plot.
sv_density_max_col(
data,
x_var,
col_var,
density_bw = "nrd0",
density_adjust = 1,
density_kernel = "gaussian",
density_n = 512,
density_trim = FALSE
)
A tibble or dataframe. Required input.
Unquoted numeric variable to be on the x scale. Required input.
Unquoted categorical variable to colour density areas. Required input.
The bw argument of the stats::density function. Defaults to "nrd0".
The adjust argument of the stats::density function. Defaults to 1.
The kernel argument of the stats::density function. Defaults to "gaussian".
The n argument of the stats::density function. Defaults to 512.
The trim argument of the stats::density function. Defaults to FALSE.