Learn R Programming

simplevis (version 4.4.0)

sv_density_max_col_facet: Calculate the max density in a gg_density_col_facet(..., position == "identity") plot.

Description

Calculate the max density in a gg_density_col_facet(..., position == "identity") plot.

Calculate the max density in a gg_density_col_facet(..., position == "identity") plot.

Usage

sv_density_max_col_facet(data, x_var, col_var, facet_var,
  density_bw = "nrd0", density_adjust = 1,
  density_kernel = "gaussian", density_n = 512, density_trim = FALSE)

sv_density_max_col_facet(data, x_var, col_var, facet_var, density_bw = "nrd0", density_adjust = 1, density_kernel = "gaussian", density_n = 512, density_trim = FALSE)

Arguments

data

A tibble or dataframe. Required input.

x_var

Unquoted numeric variable to be on the x scale. Required input.

col_var

Unquoted categorical variable to colour density areas. Required input.

facet_var

Unquoted categorical variable to facet by. Required input.

density_bw

The bw argument of the stats::density function. Defaults to "nrd0".

density_adjust

The adjust argument of the stats::density function. Defaults to 1.

density_kernel

The kernel argument of the stats::density function. Defaults to "gaussian".

density_n

The n argument of the stats::density function. Defaults to 512.

density_trim

The trim argument of the stats::density function. Defaults to FALSE.

data

A tibble or dataframe. Required input.

x_var

Unquoted numeric variable to be on the x scale. Required input.

col_var

Unquoted categorical variable to colour density areas. Required input.

facet_var

Unquoted categorical variable to facet by. Required input.

density_bw

The bw argument of the stats::density function. Defaults to "nrd0".

density_adjust

The adjust argument of the stats::density function. Defaults to 1.

density_kernel

The kernel argument of the stats::density function. Defaults to "gaussian".

density_n

The n argument of the stats::density function. Defaults to 512.

density_trim

The trim argument of the stats::density function. Defaults to FALSE.