powered by
Uses cut with breakpoints derived by getbw.
cutbw(x, k = NULL, min_n = NULL, warn = FALSE)
A numeric variable.
The desired number of active bins. A bin is active if it contains at least min_n observations. The default is k <- 1 + 2*ceiling(log(N)/log(2)).
min_n
k <- 1 + 2*ceiling(log(N)/log(2))
The minimum number of observations necessary for a bin to count as an active bin. Defaults to min_n = max(log(N/10)/log(10),1).
min_n = max(log(N/10)/log(10),1)
Whether or not to print a warning if the desired number of bins is not possible.
An ordinal factor variable.
getbw, ahist
# NOT RUN { y<-cutbw(c(rnorm(200),rnorm(100,mean=8)),k = 30, min_n = 1) barplot(table(y)) # }
Run the code above in your browser using DataLab