Learn R Programming

ade4 (version 1.4-3)

capitales: Road Distances

Description

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

Usage

data(capitales)

Arguments

source

http://www.euro.gouv.fr/jeunes/eurocollege/tableaucarte.htm

Examples

Run this code
if (require(pixmap, quiet = TRUE)) {
         data(capitales)
         names(capitales$df)
         # [1] "Madrid"     "Paris"      "Londres"    "Dublin"     "Rome"      
         # [6] "Bruxelles"  "Amsterdam"  "Berlin"     "Copenhague" "Stokholm"  
         #[11] "Luxembourg" "Helsinki"   "Vienne"     "Athenes"    "Lisbonne"

         index <- unlist(lapply(1:15,function(i) which(names(capitales$logo)==tolower(rownames(capitales$df)[i])) ))
         w1 <- capitales$area
         par(mfrow=c(2,2))
         s.label(capitales$xy, lab = names(capitales$df)) 
         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")))
	 s.logo(capitales$xy, capitales$logo, klogo = index, add.plot = TRUE,clogo=.5) # depends on pixmap
         table.dist(as.dist(capitales$df), lab = names(capitales$df)) # depends on mva
    	 s.logo(pcoscaled(lingoes(as.dist(capitales$df))),capitales$logo,klogo=index,clogo=.5) #depends on pixmap
}

Run the code above in your browser using DataLab