Set coordinates that are used to plot vertices for the weights matrix.

set_coords(x, coords)

Arguments

x

a [wmat()] object

coords

an object inheriting from "sfc_POINT", see [sf::st_sfc()] and [sf::st_point()].

Details

The weights matrices returned by [w_contiguity()] etc. return a [wmat()] object without the optional "coords" argument that is used to plot the vertices. `set_vertices` allows setting these after the fact, and is used for example internally in [wstates()] to set the coords to the state capital coordinates.