wstates: State W

Description Usage Arguments Examples

View source: R/spatlag.R

Description

Spatial weights matrix for independent states on a date

Usage

1
wstates(date, w_func = w_contiguity, ccode = NULL)

Arguments

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

Examples

1
2
3
4
5
6
7
8
w <- wstates("2010-01-01")
w
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)

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