ggxtabs: ggxtabs

ggxtabsR Documentation

ggxtabs

Description

Mosaic ggplot of xtabs object

Usage

ggxtabs(
  xtab,
  cell_counts = F,
  stats = F,
  viridis_option = "G",
  border_color = "white"
)

Arguments

xtab

xtabs object of exactly two categorical variables

cell_counts

Display cell counts, Default: F

stats

Display Chisq stats in caption, Default: F

viridis_option

Viridis color palette, Default: 'G'

border_color

Color of border between cells, Default: 'white'

Details

Takes a table of exactly two categorical variables produced by xtabs and produces a ggplot mosaic plot

Value

ggplot

Examples

## Not run: 
if(interactive()){
 ggxtabs(xtabs(~color+clarity, diamonds), viridis_option = 'H')
 }

## End(Not run)

grasshoppermouse/hagenutils documentation built on Dec. 6, 2024, 8:31 p.m.