Package: mosaicresid 0.1.1

Sam Butler

mosaicresid: Residual-Shaded Mosaic Plots for 'ggplot2'

A 'ggplot2'-native alternative to the shaded mosaic plots drawn by mosaicplot() in base 'R'. geom_mosaic_resid() maps two categorical variables with ordinary 'ggplot2' aesthetics, recursively partitions the unit square into tiles sized by their joint proportions, computes Pearson, deviance, or Freeman-Tukey residuals against a two-way independence model, and maps the residuals to fill color. It works on raw data, already aggregated counts, or contingency tables, and the tile geometry and residuals are also returned as a data frame by compute_mosaic_residuals().

Authors:Sam Butler [aut, cre]

mosaicresid_0.1.1.tar.gz
mosaicresid_0.1.1.zip(r-4.7-any)mosaicresid_0.1.1.zip(r-4.6-any)
mosaicresid_0.1.1.tar.gz(r-4.7-any)mosaicresid_0.1.1.tar.gz(r-4.6-any)
mosaicresid_0.1.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION
card.svg |card.png
mosaicresid/json (API)

# Install 'mosaicresid' in R:
install.packages('mosaicresid', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/sbutler22/geom_mosaic/issues

On CRAN:

Conda:

3.00 score 8 exports 26 dependencies

Last updated from:2072620d17. Checks:6 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK139
source / vignettesOK195
linux-releaseOK140
windows-develOK73
windows-releaseOK77
wasm-releaseOK113

Exports:compute_mosaic_residualsgeom_mosaic_residscale_fill_mosaic_residualstat_mosaic_labelstat_mosaic_residualStatMosaicLabelStatMosaicResidualto_long_counts

Dependencies:clicpp11dplyrfarvergenericsggplot2gluegtableisobandlabelinglifecyclemagrittrpillarpkgconfigpurrrR6RColorBrewerrlangS7scalestibbletidyselectutf8vctrsviridisLitewithr

Getting Started with mosaicresid
Why this package exists | Working with raw or pre-aggregated data | Overriding the color scale | Spacing, labels, and small cells | Matching base R's dir and type options | Inspecting the numbers directly | What this package deliberately does not do

Last update: 2026-11-20
Started: 2026-11-20

mosaicresid vs base R mosaicplot() vs ggmosaic2
Why this document exists | Feature-by-feature comparison | Is aes(x =, y =) vs product() a real differentiator? | Defending the one deliberate gap: n-way support | Everything else: closed | Bottom line

Last update: 2026-11-20
Started: 2026-11-20