?mosaicplot -- Bert Gunter
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sang Chul Choi Sent: Thursday, May 01, 2008 4:09 PM To: r-help@r-project.org Subject: [R] A plot of factor data? Hi, I am wondering if there is a way to plot proportions of factors. I tried to find plot functions for those but in vain. For example, I have a data like this where column "a" has 10 of "0"s and 15 of "1"s, and column "b" has 5 and 20. > x <- data .frame ("a"=factor(c(rep(0,10),rep(1,15))),b=factor(c(rep(0,5),rep(1,20)))) > summary(x) a b 0:10 0: 5 1:15 1:20 I want to have a plot like: |-----| | | <--- proportion of "0" | | |-----| | | | | <--- proportion of "1" | | |-----| column "a" |-----| | | <--- proportion of "0" |-----| | | | | | | <--- proportion of "1" | | |-----| column "b" Is there anybody who can do this easily? I appreciate any help. Thank you, Sang Chul ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.