I have a large dataset with response times. I need to make reference to the first empty bin of the histogram (with x
being milliseconds), and exclude all data that comes after that.
I think
Can anybody help?
I have a large dataset with response times. I need to make reference to the first empty bin of the histogram (with x
being milliseconds), and exclude all data that comes after that.
I think
Can anybody help?
If you capture the return of hist
it contains all of the information that you need.
set.seed(3)
x = rnorm(20)
H = hist(x)
min(which(H$counts == 0))
[1] 5
To exclude the data that bin and above
MIN = min(which(H$counts == 0))
x = x[x<H$breaks[MIN]]