mosaic2: Mosaic Plot

Description Usage Arguments Value Examples

Description

Mosaic Plot

Usage

1
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

1
2
3
4
5
6
7
8
9
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")

tjssu/Rstat documentation built on Aug. 8, 2020, 12:38 p.m.