有许多解决方案可以在国家级别上绘制地图,但在我的情况下,我想在大陆级别上打印统计数据。
我能想到的唯一方法是使用国家级别的地图,并为每个大陆使用一个国家列表,但我想知道是否有任何简单的解决方案适用于这种地图。要实现我的想法,应该像这样:
## produce the world map
map()
## list of countries per continent
SA <- c("argentina", "bolivia", "brazil", "chile", "colombia", "ecuador", "guyana", "paraguay", "peru", "suriname", "uruguay", "venezuela")
map(regions = SA, fill=TRUE, add=TRUE)
sp
包中的readShapeSpatial
加载shapefile,然后使用相当简单的plot
绘制它们(需要maptools
包来绘制shapefiles)。目前为止,由于您还没有展示您的代码,这不是一个编程问题。 - plannapus