Re: [R] How to obtain Frequency Tables for Histogram outputs and Frequency Polygons

From: Gabor Grothendieck <>
Date: Tue 12 Jul 2005 - 15:12:11 EST

On 7/12/05, Tan Hui Hui Jenny <> wrote:
> Couple of questions:
> 1. How can I obtain the frequency tables for a histogram chart?
> 2. Is there a short cut to obtain the frequency polygons directly without having to generate the frequency table and doing a line plot?

res <- hist(x) # res contains various data about histogram

# create red polygons using rect
plot(range(res$breaks), range(res$counts), type="n") rect(res$breaks[-length(res$breaks)],0,res$breaks[-1],res$counts, col="red") mailing list PLEASE do read the posting guide! Received on Tue Jul 12 15:17:02 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:30 EST