ggstratify: Fast Stratified Descriptive Figures with a Point-and-Click GUI
A point-and-click 'shiny' interface for the descriptive analysis
that comes before any model is chosen. Pass a data frame, pick the
variable to describe, and add the layers you want to see it within: a
second variable becomes the panels of a 'ggplot2' facet_wrap(), and
further variables become separate figures, one file each, taken either one
variable at a time or crossed. Every stratum is reported with the number
of observations behind it, on the figure and on each of its panels; strata
that contain none are listed rather than dropped, and rows with a missing
value in a layer variable are excluded and counted. A continuous variable
can be categorized into quantile groups, equal-width bins or user-supplied
cut points, a variable of any type can be turned into whether it is
missing or observed, so that the rows a layer would exclude become a
stratum of their own, and a date or date-time variable can be read at a
chosen resolution, either as a calendar period or as a position in the
yearly cycle such as the month or the season; any of them can then be used
as a layer. The figure types
follow those offered by the 'ggplotgui' package and add the line plot for
change over time, an optional LOWESS smoother, and the Kaplan-Meier curve
estimated by 'survival', with an optional number-at-risk table. An error
bar can show a standard error or a confidence interval, the latter from
the t distribution for a mean and from the Clopper-Pearson or Wilson
method for a proportion, and the points can be joined by a line computed
from the same summary, which is how a trend over time is read. A survey
weight can be set: the figure is then drawn from the weighted data, every
count is reported both as rows and as
the sum of the weights, and error bars and confidence bands are
design-based estimates from the 'survey' package. Columns
are described as they are typed, so convert each to the type you mean
first. Figures are
written as PNG or SVG, and the application prints the 'ggplot2' code
behind the figure on screen, so that a description can be repeated, shared
or accounted for later. Everything runs locally, with no network access and no AI involved.
| Version: |
0.2.0 |
| Depends: |
R (≥ 4.1) |
| Imports: |
bslib (≥ 0.5.0), checkmate (≥ 2.1.0), data.table (≥
1.14.0), ggplot2 (≥ 3.4.0), grDevices, patchwork (≥ 1.1.0), ragg, shiny (≥ 1.7.0), stats, survey (≥ 4.5), survival (≥
3.2.0), utils |
| Suggests: |
knitr, rmarkdown, svglite (≥ 2.1.0), testthat (≥ 3.0.0), tibble |
| Published: |
2026-09-25 |
| DOI: |
10.32614/CRAN.package.ggstratify |
| Author: |
Akihiro Shiroshita [aut, cre, cph],
Yuki Kataoka [aut] |
| Maintainer: |
Akihiro Shiroshita <akihirokun8 at gmail.com> |
| BugReports: |
https://github.com/AkiShiroshita/ggstratify/issues |
| License: |
GPL-3 |
| URL: |
https://github.com/AkiShiroshita/ggstratify,
https://akishiroshita.github.io/ggstratify/ |
| NeedsCompilation: |
no |
| Language: |
en-US |
| Citation: |
ggstratify citation info |
| Materials: |
README, NEWS |
| CRAN checks: |
ggstratify results |
Documentation:
Downloads:
Linking:
Please use the canonical form
https://CRAN.R-project.org/package=ggstratify
to link to this page.