I've read a number of examples on doing a multiple bar plot, but cant seem
to grasp
how they work or how to get my data into the proper form.
I have two variable holding the same factor
The variables were created using a cut command, The following simulates that
A <- 1:100
B <- 1:100
A[30:60] <- 43
Acut <- cut(A,breaks=c(0,10,45,120),labels=c("low","med","high"))
Bcut <- cut(B,breaks=c(0,10,45,120),labels=c("low","med","high"))
What I want to do is create a barplot with 3 groups of side by side bars
group 1, = "low" and the two bars would be the count for Acut, and the count
for Bcut
group 2 = "med" and the two bars again would be the counts for this factor
level in Acut and Bcut
group 3 = high and like the above two.
[[alternative HTML version deleted]]
______________________________________________
[email protected] 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.