Skip to content

histogram bug?: type='count', unequal breaks

2 messages · scottyv@bell-labs.com, Deepayan Sarkar

#
I ask for a histogram of counts with slightly uneven breaks but
histogram() ignores the 'type' argument and provides density scaling
instead.

   x = sample(1:3, 100, replace=TRUE)
   histogram( ~ x, breaks=c(0,1.5,2.5,3.5), type='count')

My real application has time data with month boundaries for the breaks
and I DO want counts on the y-axis.

A work-around is not difficult but shouldn't histogram honor the
type argument when given?

 Scott Vander Wiel
 Statistics and Data Mining Research
 Bell Laboratories, Lucent Technologies
#
On Friday 13 December 2002 12:43 pm, scottyv at bell-labs.com wrote:
Yes, it should, and it doesn't because of a bug in the released version of 
lattice. This should be fixed in the next release (hopefully sometime next 
week).

Deepayan