[R] Help with shading a polygon below a segment of a curve (normal distribution)

2008-08-28 Thread Bertolt Meyer
Dear R users, I still feel new to R so please apologize if I am doing something stupid here. My use of the polygon() function produces a result that I cannot comprehend: In a plot, I would like to shade the area below a normal distribution. However, I do not want the entire area to be shaded,

Re: [R] Help with shading a polygon below a segment of a curve (normal distribution)

2008-08-28 Thread Peter Dalgaard
Bertolt Meyer wrote: Dear R users, I still feel new to R so please apologize if I am doing something stupid here. My use of the polygon() function produces a result that I cannot comprehend: In a plot, I would like to shade the area below a normal distribution. However, I do not want the

Re: [R] Help with shading a polygon below a segment of a curve (normal distribution)

2008-08-28 Thread Greg Snow
The power.examp function in the TeachingDemos package (among others) may already do what you want. Even if it does not, it does shade the area under a curve, you can look at the source for the function as an example of where to start. Hope this helps, -- Gregory (Greg) L. Snow Ph.D.