# x is a data.frame from below x2 <- do.call("rbind", split(x$Count, x$CAT1)) dimnames(x2)[[2]] <- letters[1:3]
barplot(x2, legend = TRUE)
Sundar
Yun-Fang Juan wrote:
posting the question in r-help@ to get more feedback :-)
thanks,
Yun-Fang
----- Original Message ----- From: "Yun-Fang Juan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 16, 2003 2:04 PM
Subject: [S] plot stacked bar chart in R
Hi, I am trying to plot a stacked bar chart in R but am not able to find the documentation.
The input data format is like the following
CAT1 CAT2 Count A a 234 A b 758 A c 156 B a 753 B b 568 B c 684 C a 356 C b 564 C c 256 D a 123 D b 165 D c 754
please advice.
thanks,
Yun-Fang
-------------------------------------------------------------------- This message was distributed by [EMAIL PROTECTED] To ...(s-news.. clipped)...
______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help