mosaic2: Mosaic Plot

mosaic2R Documentation

Mosaic Plot

Description

Mosaic Plot

Usage

mosaic2(tab, mt, dig = 4, resid = TRUE)

Arguments

tab

Data table

mt

Graph title

dig

Number of digits below the decimal point, Default: 4

resid

Display Pearson residuals? Default: TRUE

Value

Object from chisq.test()

Examples

require(vcd)
x = c(39,18,12,31,14, 35,23,18,35,13,  27,16,17,24,8,  9,12,8,19,22)
x = matrix(x, nrow=4, ncol=5, byrow=TRUE)
Subject = c("Kor", "Eng", "Math", "Etc")
Hope = c("Sam", "Pub", "Exp", "Sal", "Etc")
t1 = as.table(x)
dimnames(t1) = list(Subject=Subject, Hope=Hope)
win.graph(7, 6)
mosaic2(tab=t1, mt="Students' Favorite Subject and Hope")

adoocavo/Rstat_M1 documentation built on March 19, 2022, 3:34 a.m.