[R] normalized frequency histogram

Spencer Graves spencer.graves at pdf.com
Thu Apr 3 13:35:12 CEST 2003

Have you considered "truehist" in library(mass)?

Spencer Graves
p.s.  This is discussed in Venables and Ripley (2002) Modern Applied 
Statistics with S, 4th ed., which I recommend highly for anyone who uses 
S-Plus or R.  I only wish I had gotten the first edition when it 

Jim McLoughlin wrote:
> Hi folks
> I'm trying to plot a normalized frequency histogram of some data.  After 
> checking the docs, it seems there is no built in feature for this.
> from the definition for normalized frequency, I need to divide the 
> relative frequency by the size of the intervals being used.
> So I could divide the series by this interval length, and then plot the 
> relative frequency.
> The problem is determining the interval length that will be used in 
> advance.  I'm supposed to manually pick the # of intervals between 20 
> and 40 (not use sturges).  However, when I try different values for the 
> nbreaks parameters, incrementing from 20 - 40, the histogram only 
> changes at a couple of points on that interval.
> Anyone have any suggestions as to how I should create this plot?  Or an 
> explanation as to why my nbreaks parameter does not seem to force the 
> number of intervals, but rather suggests a ballpark to be in?
> thanks
> Jim M
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help

More information about the R-help mailing list