The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

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().

Version: 0.1.1
Depends: R (≥ 4.1.0)
Imports: ggplot2 (≥ 3.4.0), dplyr, tibble, purrr, rlang
Suggests: testthat (≥ 3.0.0), knitr, rmarkdown, S7
Published: 2026-11-20
DOI: 10.32614/CRAN.package.mosaicresid
Author: Sam Butler [aut, cre]
Maintainer: Sam Butler <swmbutler at gmail.com>
BugReports: https://github.com/sbutler22/geom_mosaic/issues
License: MIT + file LICENSE
URL: https://github.com/sbutler22/geom_mosaic
NeedsCompilation: no
Materials: README
CRAN checks: mosaicresid results

Documentation:

Reference manual: mosaicresid.html , mosaicresid.pdf
Vignettes: mosaicresid vs base R mosaicplot() vs ggmosaic2 (source, R code)
Getting Started with mosaicresid (source, R code)

Downloads:

Package source: mosaicresid_0.1.1.tar.gz
Windows binaries: r-devel: mosaicresid_0.1.1.zip, r-release: mosaicresid_0.1.1.zip, r-oldrel: not available
macOS binaries: r-release (arm64): mosaicresid_0.1.1.tgz, r-oldrel (arm64): mosaicresid_0.1.1.tgz, r-release (x86_64): mosaicresid_0.1.1.tgz, r-oldrel (x86_64): mosaicresid_0.1.1.tgz

Linking:

Please use the canonical form https://CRAN.R-project.org/package=mosaicresid to link to this page.

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.