sframe_plot_descriptives: Distribution shape by variable, standardised

View source: R/plots.R

sframe_plot_descriptivesR Documentation

Distribution shape by variable, standardised

Description

One violin per variable in a descriptives_report() table, built from the underlying response data rather than from the summary skewness and kurtosis numbers, so the reader sees the actual shape (asymmetry, multimodality, tails) instead of reading it off a bar height. Each variable is standardised (z-scored) before plotting so variables on different original scales (a 5-point Likert item next to a 0-100 slider) share one comparable y-axis; standardising is a linear transform and does not change skewness. Each violin's subtitle-free panel keeps the variable's skewness value in its axis label. Grouped descriptives_report() output (one row per variable per split_by group) is faceted by group.

Usage

sframe_plot_descriptives(x, data, palette = c("web", "print"))

Arguments

x

An sframe_descriptives_report object from descriptives_report().

data

The same data.frame passed to descriptives_report(). Required: x only carries the summary table, not the raw values the violins need.

palette

One of "web" or "print". See sframe_brand().

Value

A ggplot2 object, or NULL if none of the report's variables have enough data to draw.

See Also

descriptives_report()


surveyframe documentation built on July 25, 2026, 1:07 a.m.