Skip to content

Getting Break Points From Hist Function?

2 messages · Bleh Blah, Ott Toomet

#
Is there any way to extract the break points from a hist function as a 
vector so I can later use them for a cut function?

The ultimate goal is to make a frequency table of the data with the same 
break points that were used in the histogram.

Thank you in advance.

-Brian

_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
#
Hi,

I guess you are looking for something like

a <- hist(...., plot=FALSE) # don't draw the histogram
a$breaks # breakpoints
a$counts # frequency table

This is documented as the return value for hist() on the help page.

Perahps it helps.

Ott

 | From: "Bleh Blah" <jacksragingvileduct at hotmail.com>
 | Date: Wed, 04 Dec 2002 15:22:19 -0500
 | 
 | Is there any way to extract the break points from a hist function as a 
 | vector so I can later use them for a cut function?
 | 
 | The ultimate goal is to make a frequency table of the data with the same 
 | break points that were used in the histogram.