get_local_density | R Documentation |
Compute a 2D density estimate and return the estimate evaluated at each pair of points
get_local_density(x, y, group = NULL, ...)
x |
a vector of x-values |
y |
a vector of y-values |
group |
a group |
... |
arguments to pass to ks::kde for the density estimation |
This is useful for computing color-density scatterplots.
overlapping = data.frame(x = rt(3e3, df = 3), y = rt(3e3, df = 3))
get_local_density(overlapping$x, overlapping$y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.