capitales: Road Distances

Description Usage Format Examples

Description

This data set gives the road distances between 15 European capitals and their coordinates.

Usage

1

Format

This list contains the following objects:

dist

is dist object the road distances between 15 European capitals.

xy

is a data frame containing the coordinates of capitals.

area

is a data frame containing three variables, designed to be used in area.plot function.

logo

is a list of pixmap objects, each one symbolizing a capital

Spatial

is a SpatialPolygons object containing the map

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
data(capitales)
attr(capitales$dist, "Labels")
index <- pmatch(tolower(attr(capitales$dist, "Labels")), names(capitales$logo))
w1 <- capitales$area

if(adegraphicsLoaded()) {
  if(requireNamespace("sp", quiet = TRUE)) {
    g1 <- s.label(capitales$xy, lab = rownames(capitales$xy), pori.incl = F, plot = F)
    g2 <- (capitales$xy[sort(rownames(capitales$xy)), ], capitales$logo, 
      Sp = capitales$Spatial, pback.col = "lightblue", pSp.col = "white", pgrid.draw = FALSE, 
      plot = F)
    g3 <- table.value(capitales$dist, ptable.margin = list(b = 5, l = 5, t = 15, r = 15), 
      ptable.x.tck = 3, ptable.y.tck = 3, plot = F)
    g4 <- (pcoscaled(lingoes(capitales$dist)), capitales$logo[index], plot = F) 
    
    G <- ADEgS(list(g1, g2, g3, g4), layout = c(2, 2))
  }
  
} else {
  if(requireNamespace("pixmap", quiet = TRUE)) {
    par(mfrow = c(2, 2))
    s.label(capitales$xy, lab = attr(capitales$dist, "Labels"), include.origin = FALSE)
    area.plot(w1)
  	rect(min(w1$x), min(w1$y), max(w1$x), max(w1$y), col = "lightblue")
  	invisible(lapply(split(w1, w1$id), function(x) polygon(x[, -1], col = "white")))
  	(capitales$xy, capitales$logo, klogo = index, add.plot = TRUE, 
  	 include.origin = FALSE, clogo = 0.5) # depends on pixmap
    table.dist(capitales$dist, lab = attr(capitales$dist, "Labels")) # depends on mva
    (pcoscaled(lingoes(capitales$dist)), capitales$logo, klogo = index, clogo = 0.5) 
      # depends on pixmap
    par(mfrow = c(1, 1))
  }
  }

ade4 documentation built on May 2, 2019, 5:50 p.m.

Related to capitales in ade4...