add_local_density | R Documentation |
Add a column of local density to a data frame
add_local_density(.data, x, y, var = "local_density", sort_output = TRUE)
.data |
input data frame |
x |
unquoted column name of variable to use for the x-variable |
y |
unquoted column name of variable to use for the y-variable |
var |
name to use for the output column |
sort_output |
if TRUE, return the output sorted by local density |
The sort_output
parameter sometimes helps the output plot
look a little less speckled.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.