- library(geostan)
- library(ggplot2)
- library(gridExtra)
- data("georgia")
- sp_diag(georgia$college, georgia, name = "College (%)")
- #> Contiguity condition: queen
- #> Number of neighbors per unit, summary:
- #> Min. 1st Qu. Median Mean 3rd Qu. Max.
- #> 1.000 4.000 5.000 5.409 6.000 10.000
- #>
- #> Spatial weights, summary:
- #> Min. 1st Qu. Median Mean 3rd Qu. Max.
- #> 0.1000 0.1429 0.1667 0.1849 0.2000 1.0000
也可以根据地图生成空间权重矩阵和Moran散点图:
- W <- shape2mat(georgia, style = "W")
- moran_plot(georgia$college, W)


雷达卡




京公网安备 11010802022788号







