On 12/03/12 21:44, jpm miao wrote:
Hello,
Thanks very much for your kind response. Yes, if I multiply by the
width "35", the area should be equal to one.
How can I plot the probability bars rather than density bars? That
is, I would like the height of the first bar to be 0.279, which is the
probability that the variable falls between 0 and 35.
If you want probabilities rather than densities you should be using
barplot() rather
than histogram:
TBL <- table(Y1)
barplot(TBL/sum(TBL))
cheers,
Rolf Turner
______________________________________________
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.