Description Usage Arguments Value Examples
Compute the spatial lag for idx-th observation using selected variable and current weights matrix
1 | spatial_lag(gda_w, idx, values)
|
gda_w |
A Weight object |
idx |
A value indicates idx-th observation, idx start from 1 |
values |
A vector of values |
Value of the spatial lag for idx-th observation
1 2 3 4 5 6 7 8 | ## Not run:
guerry_path <- system.file("extdata", "Guerry.shp", package = "rgeoda")
guerry <- geoda_open(guerry_path)
queen_w <- queen_weights(guerry)
lag0 <- spatial_lag(queen_w, idx = 1, values = crm_prs)
cat("\nSpatial lag of the 1-st observation of variable crm_prs is:", lag0)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.