Maps (cartography)

('rivers',add=T) > map('worldHires', col=1:10) > map('worldHires', 'Switzerland') > title('Switzerland') > map('worldHires', col=1:10) > map('worldHires') library(maps) # Provides functions that let us plot the maps library(mapdata) # Contains the hi-resolution points that mark out the countries.

R has a special set of classes and methods for spatial data analysis. The core mapping facilities of are a found in package maptools; when you have defined the appropriate spatial data object rworldmap

  • maptools
  • ggplot2 has mapping tools there is also

    rworldmap and both lattice and ggplot let you draw maps.

    chmap = readShapePoly("X:/G3G09.shp") ggplot(chmap, aes(x=long,y=lat,group=group)) + geom_path() chmap1=fortify(chmsp)
    Internet links