Spatial weights matrix for independent states on a date
wstates(date, w_func = w_contiguity, ccode = NULL)
date | A Date or YYYY-MM-DD string |
---|---|
w_func | type of spatial weighting function |
ccode | Optional vector of numeric G&W country codes to subset by |
w <- wstates("2010-01-01") w#> Spatial weights matrix [194 x 194] #> Type: Contiguity (rook)plot(w)# state capitals are by default used for the vertices when plotting # reset to null to default to centroids attr(w, "coords") <- NULL plot(w)#> Warning: st_centroid does not give correct centroids for longitude/latitude data