plot_metrics {volker}R Documentation

Output a plot with distribution parameters such as the mean values

Description

The plot type depends on the number of selected columns:

Group comparisons:

By default, if you provide two column selections, the second selection is treated as categorical. Setting the metric-parameter to TRUE will call the appropriate functions for correlation analysis:

Parameters that may be passed to the metric functions (see the respective function help):

[Experimental]

Usage

plot_metrics(data, cols, cross = NULL, metric = FALSE, clean = TRUE, ...)

Arguments

data

A data frame.

cols

A tidy column selection, e.g. a single column (without quotes) or multiple columns selected by methods such as starts_with().

cross

Optional, a grouping column (without quotes).

metric

When crossing variables, the cross column parameter can contain categorical or metric values. By default, the cross column selection is treated as categorical data. Set metric to TRUE, to treat it as metric and calculate correlations.

clean

Prepare data by data_clean.

...

Other parameters passed to the appropriate plot function.

Value

A ggplot object.

Examples

library(volker)
data <- volker::chatgpt

plot_metrics(data, sd_age)


[Package volker version 3.0.0 Index]