philipp schmidt-3 wrote:
>
> i am working with two sets of likert scale type (4 distinct values) data:
>
> dataA <- rep(1:4, c(3,2,2,4))
> dataB <- rep(1:4, c(5,4,3,2))
>
> i can now (bar)plot both of these separately and compare the
> distributions.
>
> plot(table(dataA), type='h')
> plot(table(dataB), type='h')
>
> is there a way to plot both of them in one plot, so that the bars for
> value "1" (dataA: 3, dataB: 5) would appear side by side, followed by
> the bars for value 2 etc.?
>
>
barplot(rbind(table(dataA),table(dataB)),beside=TRUE)
or see plotrix::multhist
--
View this message in context:
http://www.nabble.com/is-it-possible-to-combine-multiple-barplots--tp23943970p23966848.html
Sent from the R help mailing list archive at Nabble.com.
______________________________________________
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.