[R] For two vectors, how to plot bin-to-bin histogram comparision in R?
gunter.berton at gene.com
Sat Feb 15 08:55:56 CET 2014
Of course the OP failed to note that no pictures can come through...
Do not do this! It can be highly misleading (due to arbitrariness of
for a much better way to compare distributions.(alas, rarely used
except by statisticians)
Genentech Nonclinical Biostatistics
"Data is not information. Information is not knowledge. And knowledge
is certainly not wisdom."
H. Gilbert Welch
On Fri, Feb 14, 2014 at 7:30 PM, arun <smartpink111 at yahoo.com> wrote:
> Try ?multhist() from library(plotrix)
> vec1 <- rnorm(1e4,0,0.5)
> vec2 <- rnorm(1e4,0,0.5)
> I've met a problem recently. Have you ever been met a plot like the belowing?
> this picture, as you see, the solid black bars represent one vector
> (named as vector A), and the empty bars represent the other vector
> (named as vector B). I know how to plot two histogram together in one
> picture. however, I don't know how to draw and compare them in
> bin-to-bin form just like the above picture. Did anybody know how to
> plot this in R?
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help