[R] hist function to give each cell equal area
Dan Bolser
dmb at mrc-dunn.cam.ac.uk
Fri Jan 7 11:20:44 CET 2005
Hi,
I want to use hist with non-equi-spaced breaks, picked such that the
fraction of the data points falling in the cells (defined by 'breaks') is
roughly equal accross all cells.
Is there such a function that will automatically try to determine the
breaks to fullfill this requirement?
Something like..
hist( x, br = magic_function_to_pick_breaks())
For example, if x looked like this...
x <- c( 1:5, 10+1:5, 100+1:5 )
the breaks would define cells like this
hist(x,breaks=c(0,5,15,105))
Is there such a function?
More information about the R-help
mailing list