Learn R Programming

spam (version 0.20-3)

germany: Administrative districts of Germany

Description

Constructing the adjacency graph and displaying the data over the administrative districts of Germany

Usage

adjacency.landkreis( loc)
map.landkreis(data, col=NULL, zlim=range(data), add=FALSE,
              legendpos=c( 0.88,0.9,0.05,0.4))

Arguments

loc
location of the graph structure, can be an URL.
data
vector of length 544
col
color scheme to be used. By default uses tim.colors if available or a generic gray scale.
zlim
the minimum and maximum values for which colors should be plotted, defaulting to the range of data.
add
logical, if true adds to current plot.
legendpos
if package fields is loaded, puts a legend at that position.

Details

adjacency.landkreis is included as an example on how to construct adjacency matrices form a (common) adjacency structure. For the particular example, note that the nodes are not numbered consecutively and that they start from zero. The perfect position of the legend is an art per se and depends on various par parameters. See also the source code of the function image.plot of fields.

References

The code of map.landkreis is very similar to germany.map from the package INLA.

See Also

Oral, image.plot.

Examples

Run this code
loc <- system.file("demodata/germany.adjacency", package="spam")
display( adjacency.landkreis( loc))

map.landkreis( Oral$E)

Run the code above in your browser using DataLab