data(Mental)
str(Mental)
(Mental.tab <- xtabs(Freq ~ ses + mental, data=Mental))
# mosaic and sieve plots
mosaic(Mental.tab, gp=shading_Friendly)
sieve(Mental.tab, gp=shading_Friendly)
if(require(ca)){
plot(ca(Mental.tab), main="Mental impairment & SES")
}
Run the code above in your browser using DataLab