[R] Extracting bins and frequencies from frequency table

2010-09-22 Thread Ralf B
Dear R users, I would like to great a frequency table from raw data and then access the classes/bins and their respective frequencies separately. Here the code to create the frequency tables: x1 - c(1,5,1,1,2,2,3,4,5,3,2,3,6,4,3,8) t1 - table(x1) print(t1[1]) Its easy to plot this, but how do

Re: [R] Extracting bins and frequencies from frequency table

2010-09-22 Thread Mike Rennie
Hi Ralf try hist() obl-hist(x1, plot=FALSE) it returns midpoints and their respective frequencies. You can specify the breakpoints as well. ?hist for details. Mike On Wed, Sep 22, 2010 at 1:44 PM, Ralf B ralf.bie...@gmail.com wrote: Dear R users, I would like to great a frequency table

Re: [R] Extracting bins and frequencies from frequency table

2010-09-22 Thread Phil Spector
Ralf - Try bins = as.numeric(names(t1)) freqs = as.vector(t1) - Phil Spector Statistical Computing Facility Department of Statistics

Re: [R] Extracting bins and frequencies from frequency table

2010-09-22 Thread Henrique Dallazuanna
Try this: as.data.frame(table(x1)) On Wed, Sep 22, 2010 at 3:44 PM, Ralf B ralf.bie...@gmail.com wrote: Dear R users, I would like to great a frequency table from raw data and then access the classes/bins and their respective frequencies separately. Here the code to create the frequency