Message-ID: <43380278.4050000@pdf.com>
Date: 2005-09-26T14:15:20Z
From: Sundar Dorai-Raj
Subject: histogram - one bin for all values larger than a certain value
In-Reply-To: <000b01c5c29f$48232aa0$0ca54e8d@asnb22301>
Florian Defregger wrote:
> Dear all,
> I wonder if I can put together a histogram where one bin contains all the
> values that are larger than a certain specified value.
>
> Example:
> I have values ranging from 0 to 40 and I want 10 bins from 0 to 10, i.e. for
> the intervals [0,1), [1,2) , ..., [9,10). And then I want one last bin which
> contains all the values larger than 10, i.e. for the interval [10, 40).
>
> Thanks,
> Florian
>
Hi, Florian,
See the "breaks" argument in ?hist.
x <- sample(1:40, 1000, replace = TRUE)
hist(x, breaks = c(0:10, 40))
Is this what you intended?
--sundar