Given geometry and a neighbor list, creates an sf
object to be used as nodes in an sfnetworks::sfnetwork()
.
Usage
st_as_nodes(x, ...)
# S3 method for sf
st_as_nodes(x, nb)
# S3 method for sfc
st_as_nodes(x, nb)
Arguments
- x
object of class
sf
orsfc
.- nb
a neighbor list. If
x
is classsf
, the unquote named of the column. Ifx
is classsfc
, an object of classnb
as created fromst_contiguity()
.