[R] Histogram

R Help rhelp.stats at gmail.com
Thu Jun 9 00:16:06 CEST 2011


I think the command you want is barplot

x  = rbinom(10,15,0.65)
y = rbinom(10,15,0.25)
barplot(rbind(x,y),beside=TRUE)


Sam

On Wed, Jun 8, 2011 at 10:14 AM, nandini_bn <nandini_bn at hotmail.com> wrote:
>
> Hello ,
> I am trying to create a histogram in order to compare between two groups and
> would like it to be similar to the figure attached. How can I generate this
> using R ?
>
>
> Thank you,
> Nandini http://r.789695.n4.nabble.com/file/n3582448/5634-15977-1-PB.gif
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Histogram-tp3582448p3582448.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at 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.
>



More information about the R-help mailing list