Provides a technique for converting neighborhood identifiers between their numeric, string, and factor formats.

gw_nhood(.data, var, new_var, to)

Arguments

.data

Data frame, tibble, or sf object to be modified

var

Variable to base conversions on

new_var

Name of new variable; if none is specified, the var variable will be overwritten

to

The output format of the data var (one of either "numeric" or "string").