Learn R Programming

volker (version 3.0.0)

plot_metrics_one: Output a density plot for a single metric variable

Description

Output a density plot for a single metric variable

Usage

plot_metrics_one(
  data,
  col,
  ci = FALSE,
  box = FALSE,
  limits = NULL,
  title = TRUE,
  labels = TRUE,
  clean = TRUE,
  ...
)

Value

A ggplot object.

Arguments

data

A tibble.

col

The column holding metric values.

ci

Whether to plot the confidence interval.

box

Whether to add a boxplot.

limits

The scale limits. Set NULL to extract limits from the label.

title

If TRUE (default) shows a plot title derived from the column labels. Disable the title with FALSE or provide a custom title as character value.

labels

If TRUE (default) extracts labels from the attributes, see codebook.

clean

Prepare data by data_clean.

...

Placeholder to allow calling the method with unused parameters from plot_metrics.

Examples

Run this code
library(volker)
data <- volker::chatgpt

plot_metrics_one(data, sd_age)

Run the code above in your browser using DataLab