简体   繁体   English

R中的专题图

[英]Thematic maps in R

An interesting example within Shiny is US map . 美国地图是Shiny中一个有趣的例子。 I like to implement it for instance for the Postal codes in the Netherlands Dutch shapes and create a simple thematic map. 我喜欢在荷兰荷兰形状的邮政编码中实现它,并创建一个简单的专题图。

library(maptools)
readshp<-readShapeSpatial("C:/R/census-app/ESRI-PC4-2015R1.shp")

The variable on which I like to create a map is added in the Dbasefile behind the shape, but after: 我想在其上创建地图的变量被添加到形状后面的Dbasefile中,但之后:

map("readshp", fill = TRUE, col = fills, 
resolution = 0, lty = 0, projection = "polyconic",
myborder = 0, mar = c(0,0,0,0))

R shows the error: R显示错误:

Error in get(dbname) : object 'readshpMapEnv' not found get(dbname)中的错误:找不到对象“ readshpMapEnv”

How can we fix this? 我们该如何解决?

I guess it's due to the quotes. 我想这是由于引号引起的。 Remove the quotes around your object. 删除对象周围的引号。 Try: 尝试:

map(readshp, fill = TRUE, col = fills, resolution = 0, lty = 0, projection = "polyconic", myborder = 0, mar = c(0,0,0,0))

Besides.. next time "include just enough code to allow others to reproduce the problem.." see How do I ask a good question? 此外..下次“仅包含足够的代码以允许其他人重现该问题..”请参阅我如何提出一个好问题? ;) ;)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM