Re: [R] Lattice Histogram with Normal Curve - Y axis as percentages

2014-05-09 Thread Duncan Mackay
-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of jimdare Sent: Wednesday, 7 May 2014 14:53 To: r-help@r-project.org Subject: Re: [R] Lattice Histogram with Normal Curve - Y axis as percentages Thanks for your help Duncan and Peter! I ended up using a combination of your suggestions. I

Re: [R] Lattice Histogram with Normal Curve - Y axis as percentages

2014-05-07 Thread jimdare
Thanks for your help Duncan and Peter! I ended up using a combination of your suggestions. I used Duncan's y.limits ration of two plots with differing types (percent and density), to provide me with a scale variable. I then used this in Peter's dnorm_scaled function and called it using

Re: [R] Lattice Histogram with Normal Curve - Y axis as percentages

2014-05-06 Thread peter dalgaard
This illustrates why you really do not want percents... (I never quite understand why people do want them - I can understand raw counts wheh used in teaching as a precursor to the concept of a density, but percentages is an odd in-between sort of thing.) Anyways, the scaling factor is the bin

[R] Lattice Histogram with Normal Curve - Y axis as percentages

2014-05-05 Thread jimdare
Hello, This may seem like a simple problem, but it's frustrating me immensely. I'm trying to overlay a normal curve (dnorm) on top of a histogram using the code below. This works find when the type = density, but the person for whom I'm making the plot wants the y axis in percent of total

Re: [R] Lattice Histogram with Normal Curve - Y axis as percentages

2014-05-05 Thread Duncan Mackay
of New England Armidale NSW 2351 Email: home: mac...@northnet.com.au -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of jimdare Sent: Tuesday, 6 May 2014 06:23 To: r-help@r-project.org Subject: [R] Lattice Histogram with Normal Curve