Skip to contents

Given an sf or sfc object and neighbor and weights lists, create an sfnetwork object.

Usage

st_as_graph(x, ...)

# S3 method for sf
st_as_graph(x, nb, wt)

# S3 method for sfc
st_as_graph(x, nb, wt)

Arguments

x

object of class sf or sfc.

nb

a neighbor list. If x is class sf, the unquote named of the column. If x is class sfc, an object of class nb as created from st_contiguity().

wt

a weights list. If x is class sf, the unquote named of the column. If x is class sfc, the weights list itself.