Learn R Programming

gghdr (version 0.2.0)

hdr_bin: Binning highest density regions in one or two dimensions

Description

Binning highest density regions in one or two dimensions

Usage

hdr_bin(x, y = NULL, prob = c(0.5, 0.9, 0.99), ...)

Value

probability coverage for each element of the numeric vectors.

Arguments

x

Numeric vector

y

Numeric vector of same length as x.

prob

Probability coverage required for HDRs

...

...

Examples

Run this code
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