Tan Hui Hui Jenny
2005-Jul-12 04:51 UTC
[R] How to obtain Frequency Tables for Histogram outputs and Frequency Polygons
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? Thanks ina dvance for any reply. j. Example data: 0.3,0.229,0.218,0.211,0.207,0.21,0.212,0.232,0.312,0.289,0.486,0.475,0.274,0.478,0.284,0.477,0.281,0.29,0.29,0.32,0.28,0.404,0.489,0.406,0.267,0.456,0.443,0.457,0.411,0.444,0.401,0.468,0.309,0.425,0.312,0.3,0.464,0.457,0.442,0.469,0.423,0.403,0.432,0.379,0.361,0.37,0.47,0.374,0.387,0.381,0.311,0.257,0.381,0.162,0.229,0.221,0.25,0.164,0.368,0.367,0.332,0.165,0.152,0.478,0.489,0.482,0.167,0.164,0.164,0.15,0.149,0.368,0.366,0.361,0.359,0.359,0.364,0.364
Gabor Grothendieck
2005-Jul-12 05:12 UTC
[R] How to obtain Frequency Tables for Histogram outputs and Frequency Polygons
On 7/12/05, Tan Hui Hui Jenny <medp9193 at nus.edu.sg> 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")