[R] Problem with label name in mosaics plot

From: Muhammad Subianto <subianto_at_gmail.com>
Date: Mon 23 May 2005 - 20:22:28 EST


Dear all R-help,
I have a problem with label name in mosaics plot if I use more 4 variables. Let see with my toy example.

library(vcd)
toy.mosaics <-

array(c(96,44,1,138,64,2,117,56,6,75,48,5,72,49,6,83,60,8,140,
                     43,1,171,65,4,152,58,9,101,51,9,102,58,10,111,67,16,24,
                     5,2,18,7,1,16,7,3,12,6,4,6,8,3,4,10,4,21,4,1,25,6,2,20,
                     5,1,17,5,111,14,50,1,13,5,8),
               dim=c(4,4,2,3,2,6),
               dimnames=list(
                 Hair=c("Black", "Brown", "Red", "Blond"),
                 Eye=c("Green", "Hazel", "Blue", "Brown"),
                 Race=c("White", "NonWhite"),
                 Opinion=c("Yes", "No", "Und"),
                 Sex=c("Male", "Female"),
                 Age=c("18-25", "26-35", "36-45", "46-55", "56-65", "66+")))
    

# 2 variables
mosaicplot(~ Hair+Eye, data=toy.mosaics, color = TRUE) x11()
# 3 variables
mosaicplot(~ Hair+Eye+Sex, data=toy.mosaics, color = TRUE) x11()
# 4 variables
mosaicplot(~ Hair+Eye+Sex+Opinion, data=toy.mosaics, color = TRUE) x11()
# 5 variables (where is label name Race?) mosaicplot(~ Hair+Eye+Sex+Opinion+Race, data=toy.mosaics, color = TRUE) x11()
# 6 variables (where are label name Race and Age?) mosaicplot(~ Hair+Eye+Sex+Opinion+Race+Age, data=toy.mosaics, color = TRUE)

I think I am wrong to put a model or something wrong in mosaicplot? I was wondering if someone can help me.
Kindly regards,
Muhammad Subianto

> version

         _
platform i386-pc-mingw32

arch     i386           
os       mingw32        
system   i386, mingw32  
status                  
major    2              
minor    1.0            
year     2005           
month    04             
day      18             
language R              
 

> packageDescription("vcd")

Package: vcd
Version: 0.1-3.5
Date: 2005-02-28
Title: Visualizing Categorical Data
Author: David Meyer, Achim Zeileis, Alexandros Karatzoglou, Kurt

        Hornik
Maintainer: Kurt Hornik <Kurt.Hornik@R-project.org> Description: Functions and data sets based on the book "Visualizing

        Categorical Data" by Michael Friendly. License: GPL
Depends: R (>= 1.4.0), MASS
Packaged: Mon Feb 28 21:02:02 2005; hornik Built: R 2.1.0; ; 2005-04-09 21:52:15; windows



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Mon May 23 20:25:36 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:00 EST