Re: [R] A question on histogram - area much less than 1

2012-03-12 Thread David L Carlson
; Cc: r-help@r-project.org > Subject: Re: [R] A question on histogram - area much less than 1 > > 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 b

Re: [R] A question on histogram - area much less than 1

2012-03-12 Thread Rolf Turner
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 i

Re: [R] A question on histogram - area much less than 1

2012-03-12 Thread jpm miao
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 fall

Re: [R] A question on histogram - area much less than 1

2012-03-12 Thread Rolf Turner
Why do you say that the area is much lower than 1? It is exactly equal to 1. How did you calculate this area? Your code seems extremely convoluted and confused. You could construct your (rather bizarre) vector Y1 much more simply as Y1 <- rep((0.5 + 0:9)*35,c(277,146,99,80,69,63,52,53,55,98))