[R] Plotting confidence intervals

phii m@iii@g oii phiiipsmith@c@ phii m@iii@g oii phiiipsmith@c@
Sun Dec 8 03:31:44 CET 2019

I want to show little bell curves on my bar chart to illustrate the 
confidence ranges. The following example from Paul Teetor's "R Cookbook" 
does what I want, but shows I-beams instead of bell curves. The I-beams 
suggest uniform, rather than normal distributions. So I am looking for a 
way to plot normal distribution curves instead.

# Example from Paul Teetor, "R Cookbook", page 238.
heights <- tapply(Temp,Month,mean)
lower <- tapply(Temp,Month,function(v) t.test(v)$conf.int[1])
upper <- tapply(Temp,Month,function(v) t.test(v)$conf.int[2])
          main="Mean Temp. By Month",
          ylab="Temp (deg. F)")

Does anyone know a package that does this or, alternatively, can anyone 
suggest a direction to go in if one were to write R code to do this?


More information about the R-help mailing list