set_coords: Set coordinates for weights matrix

Description Usage Arguments Details

View source: R/wmat.R

Description

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

Usage

1
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.


andybega/wstates documentation built on Nov. 2, 2019, 1:53 p.m.