[R] histogram bug?: type='count', unequal breaks
Deepayan Sarkar
deepayan at stat.wisc.edu
Fri Dec 13 20:04:02 CET 2002
On Friday 13 December 2002 12:43 pm, scottyv at bell-labs.com wrote:
> 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?
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
More information about the R-help
mailing list