powered by
Binning highest density regions in one or two dimensions
hdr_bin(x, y = NULL, prob = c(0.5, 0.9, 0.99), ...)
probability coverage for each element of the numeric vectors.
Numeric vector
Numeric vector of same length as x.
Probability coverage required for HDRs
...
library(ggplot2) ggplot(data = faithful, aes(x = waiting, y = eruptions)) + geom_point(aes(colour = hdr_bin(x = waiting, y = eruptions)))
Run the code above in your browser using DataLab