1
R加强造成多边形撕裂
我在使用ggplot2绘制空间数据时遇到了一些麻烦。使用spplot绘制地图时,地图看起来不错,因此我假设撕裂发生在强化阶段。 代码如下: #install the packages library(rgdal) library(mapproj) library(raster) library(rgeos) library(ggplot2) library(plyr) if (!require(gpclib)) install.packages("gpclib", type="source") gpclibPermit() setwd("C:/Users/My Documents") #read in laa to regional mapping #must aggregate to higher level regions as data is provided at this higher level laa_region_mapping <- read.csv("laa_region.csv", header = TRUE) #read in LAA polygons laa_polygons <- …