R map libraries
The mapproj library allows you to project spherical maps onto the
plane, in various ways. It provides two functions:
mapproject is compatible with the original S function of the same
name. map.grid
is used to visualize the effect of a projection. For examples of what
you can do, see my class notes on map projections.
This library is available for noncommercial purposes only. See the
DESCRIPTION file or online help for more details. It is simply a
repackaging of the map projection
functions written by Doug McIlroy.
Download
from CRAN
The maps library which draws the maps is available from
CRAN
and Ray Brownrigg's ftp.
Installation
- Windows
- Download the zip file.
In R for Windows, select menu option
Packages -> Install Package from local zip file...
- Unix/Linux
- Unpack the tar.gz and type:
R CMD INSTALL mapproj
- Unix/Linux local install
-
If you don't have permission to install into the default directory, use
this instead:
mkdir ~/library
R CMD INSTALL mapproj --library=$HOME/library
Then edit your .Rprofile to include the line:
.libPaths("~/library")
Usage
Once the library is installed, inside R type
library(mapproj)
help(package=mapproj)
example(mapproject)
example(map.grid)
Tom Minka
Last modified: Wed Apr 26 09:45:57 GMT 2006