add_local_density: Add local density

View source: R/stats.R

add_local_densityR Documentation

Add local density

Description

Add a column of local density to a data frame

Usage

add_local_density(.data, x, y, var = "local_density", sort_output = TRUE)

Arguments

.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

Details

The sort_output parameter sometimes helps the output plot look a little less speckled.


andrewGhazi/geryon documentation built on April 14, 2025, 3:51 p.m.