[R] Histogram height

Jim Lemon jim at bitwrit.com.au
Sun Feb 1 11:44:46 CET 2009


Brendan Cusick wrote:
> Hello.  I have what I'm sure is a very simple question.  Hopefully someone
> can help.  I can't seem to find the maximum height of a histogram.  In
> matlab it would be simple to say max(hist(x, 100)), but this doesn't seem to
> work in R.  Any input would be greatly appreciated.
>   
Hi Brendan,
Try:
max(hist(x,100)$counts,na.rm=TRUE)

Jim




More information about the R-help mailing list