Skip to content
Prev 229013 / 398500 Next

Can I create an European map using the map function in R

On Tue, 27 Jul 2010, Maomao Luo wrote:
It is not clear to me what you mean by "... use this map to build the w weight matrix".  
How can you use an image on the screen to generate a matrix?

However, to get the map of Europe using the maps package, try something like this:

library(maps)
m <- map("world", xlim=c(-10, 30), ylim=c(35, 60))
Europe <- sort(m$names)
fix(Europe)	# remove anything you don't need
map("world", Europe, exact=T)

Note for example, you will need to leave in "UK:Great Britain" and "UK:Northern Ireland", 
since there is no country called "UK".  Similarly, Malta is named as "Malta:Malta".

Hope this helps,
Ray Brownrigg
Pass.