如何更改合并地图文件中的地图颜色?我错过了installing/calling
包裹吗?在什么时候插入我需要的命令?
library(ggplot2)
library(rgeos)
library(plyr)
library(rgdal)
library(RColorBrewer)
ph<- readOGR ("PHL_adm", "PHL_adm1")
id <- c(34, 35, 39, 61)
id
phsub <- ph [id, ]
summary (phsub)
plot (phsub)
Poverty <- read.csv("Poverty.csv", header=T, sep=",")
reg_merge <- merge(phsub, Poverty, by.x="NAME_1", by.y="Province")
names(reg_merge)
pal<-brewer.pal(4,"YlOrRd")
class(pal)
spplot(reg_merge, "Poverty")
我尝试了spplot(reg_merge, "Poverty", col="orange")
,但它只更改了地图的轮廓。