R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: x86_64-pc-linux-gnu (64-bit) R est un logiciel libre livré sans AUCUNE GARANTIE. Vous pouvez le redistribuer sous certaines conditions. Tapez 'license()' ou 'licence()' pour plus de détails. R est un projet collaboratif avec de nombreux contributeurs. Tapez 'contributors()' pour plus d'information et 'citation()' pour la façon de le citer dans les publications. Tapez 'demo()' pour des démonstrations, 'help()' pour l'aide en ligne ou 'help.start()' pour obtenir l'aide au format HTML. Tapez 'q()' pour quitter R. > date() [1] "Thu Sep 22 16:13:58 2011" > ################################################### > ### chunk number 2: > ################################################### > #line 94 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > data(iris) > is.data.frame(iris) [1] TRUE > any(duplicated(iris)) [1] TRUE > iris <- iris[!duplicated(iris), ] > any(duplicated(iris)) [1] FALSE > iris[1:5, ] Sepal.Length Sepal.Width Petal.Length Petal.Width Species 1 5.1 3.5 1.4 0.2 setosa 2 4.9 3.0 1.4 0.2 setosa 3 4.7 3.2 1.3 0.2 setosa 4 4.6 3.1 1.5 0.2 setosa 5 5.0 3.6 1.4 0.2 setosa > > > ################################################### > ### chunk number 3: > ################################################### > #line 110 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > subset(iris, Species == "setosa")[1:5, ] Sepal.Length Sepal.Width Petal.Length Petal.Width Species 1 5.1 3.5 1.4 0.2 setosa 2 4.9 3.0 1.4 0.2 setosa 3 4.7 3.2 1.3 0.2 setosa 4 4.6 3.1 1.5 0.2 setosa 5 5.0 3.6 1.4 0.2 setosa > > > ################################################### > ### chunk number 4: danger > ################################################### > #line 118 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > x1 <- 0.5 - 0.3 > x2 <- 0.3 - 0.1 > x1 == x2 # FALSE on most machines [1] FALSE > identical(all.equal(x1, x2), TRUE) # TRUE everywhere [1] TRUE > > > ################################################### > ### chunk number 5: egalbinaire > ################################################### > #line 134 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > subset(iris, sapply(Sepal.Length, function(x) identical(all.equal(x, 7), TRUE))) Sepal.Length Sepal.Width Petal.Length Petal.Width Species 51 7 3.2 4.7 1.4 versicolor > > > ################################################### > ### chunk number 6: toto > ################################################### > #line 140 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > "%=%" <- function(x,y) sapply(x, function(x) identical(all.equal(x, y), TRUE)) > > > ################################################### > ### chunk number 7: iris > ################################################### > #line 146 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > subset(iris, Sepal.Length %=% 7) Sepal.Length Sepal.Width Petal.Length Petal.Width Species 51 7 3.2 4.7 1.4 versicolor > > > ################################################### > ### chunk number 8: s1 > ################################################### > #line 151 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > subset(iris, Sepal.Length > 7.5) Sepal.Length Sepal.Width Petal.Length Petal.Width Species 106 7.6 3.0 6.6 2.1 virginica 118 7.7 3.8 6.7 2.2 virginica 119 7.7 2.6 6.9 2.3 virginica 123 7.7 2.8 6.7 2.0 virginica 132 7.9 3.8 6.4 2.0 virginica 136 7.7 3.0 6.1 2.3 virginica > > > ################################################### > ### chunk number 9: s2 > ################################################### > #line 158 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > subset(iris, Species %in% c("versicolor", "virginica"))[1:5, ] Sepal.Length Sepal.Width Petal.Length Petal.Width Species 51 7.0 3.2 4.7 1.4 versicolor 52 6.4 3.2 4.5 1.5 versicolor 53 6.9 3.1 4.9 1.5 versicolor 54 5.5 2.3 4.0 1.3 versicolor 55 6.5 2.8 4.6 1.5 versicolor > > > ################################################### > ### chunk number 10: s3 > ################################################### > #line 164 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > subset(iris, Sepal.Length > 5.5 & Species == "setosa") Sepal.Length Sepal.Width Petal.Length Petal.Width Species 15 5.8 4.0 1.2 0.2 setosa 16 5.7 4.4 1.5 0.4 setosa 19 5.7 3.8 1.7 0.3 setosa > > > ################################################### > ### chunk number 11: s4 > ################################################### > #line 170 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > subset(iris, Sepal.Length > 7.7 | Sepal.Length < 4.4) Sepal.Length Sepal.Width Petal.Length Petal.Width Species 14 4.3 3.0 1.1 0.1 setosa 132 7.9 3.8 6.4 2.0 virginica > > > ################################################### > ### chunk number 12: proj > ################################################### > #line 181 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > proj <- function(R, A) + { + tmp <- R[ , A, drop = FALSE] + return(tmp[ !duplicated(tmp), , drop = FALSE]) + } > > > ################################################### > ### chunk number 13: p1 > ################################################### > #line 193 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > proj(iris, c("Sepal.Length","Species"))[1:5, ] Sepal.Length Species 1 5.1 setosa 2 4.9 setosa 3 4.7 setosa 4 4.6 setosa 5 5.0 setosa > > > ################################################### > ### chunk number 14: p2 > ################################################### > #line 201 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > proj(iris, c(1,5))[1:3, ] Sepal.Length Species 1 5.1 setosa 2 4.9 setosa 3 4.7 setosa > > > ################################################### > ### chunk number 15: p3 > ################################################### > #line 210 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > proj(iris, -c(1,5))[1:5, ] Sepal.Width Petal.Length Petal.Width 1 3.5 1.4 0.2 2 3.0 1.4 0.2 3 3.2 1.3 0.2 4 3.1 1.5 0.2 5 3.6 1.4 0.2 > > > ################################################### > ### chunk number 16: virecolbyname > ################################################### > #line 217 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > proj(iris, -sapply(c("Sepal.Length","Species"), function(x) which(x == names(iris))))[1:7, ] Sepal.Width Petal.Length Petal.Width 1 3.5 1.4 0.2 2 3.0 1.4 0.2 3 3.2 1.3 0.2 4 3.1 1.5 0.2 5 3.6 1.4 0.2 6 3.9 1.7 0.4 7 3.4 1.4 0.3 > > > ################################################### > ### chunk number 17: p3 > ################################################### > #line 228 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > proj(iris, which.min(colMeans(iris[,1:4]))) Petal.Width 1 0.2 6 0.4 7 0.3 10 0.1 24 0.5 44 0.6 51 1.4 52 1.5 54 1.3 57 1.6 58 1.0 70 1.1 71 1.8 74 1.2 78 1.7 101 2.5 102 1.9 103 2.1 105 2.2 111 2.0 115 2.4 116 2.3 > > > ################################################### > ### chunk number 18: p6 > ################################################### > #line 236 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > names(iris) [1] "Sepal.Length" "Sepal.Width" "Petal.Length" "Petal.Width" "Species" > names(iris)[which(names(iris) =="Species")] <- "Especes" > names(iris) [1] "Sepal.Length" "Sepal.Width" "Petal.Length" "Petal.Width" "Especes" > > > ################################################### > ### chunk number 19: pc > ################################################### > #line 247 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > data.frame(matrix(letters[1:6],3,2))->R1 > names(R1)<-LETTERS[1:2] > R1 A B 1 a d 2 b e 3 c f > data.frame(matrix(letters[(1:9)+2],3,3))->R2 > names(R2)<-LETTERS[2:4] > R2 B C D 1 c f i 2 d g j 3 e h k > merge(R1,R2, by = character(0)) A B.x B.y C D 1 a d c f i 2 b e c f i 3 c f c f i 4 a d d g j 5 b e d g j 6 c f d g j 7 a d e h k 8 b e e h k 9 c f e h k > > > ################################################### > ### chunk number 20: m1 > ################################################### > #line 262 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > data.frame(merge(R1,R2, by = character(0))) A B.x B.y C D 1 a d c f i 2 b e c f i 3 c f c f i 4 a d d g j 5 b e d g j 6 c f d g j 7 a d e h k 8 b e e h k 9 c f e h k > > > ################################################### > ### chunk number 21: m2 > ################################################### > #line 271 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > merge(R1, R2) B A C D 1 d a g j 2 e b h k > > > ################################################### > ### chunk number 22: m3 > ################################################### > #line 278 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > merge(R1, R2, by.x = "B", by.y = "B") B A C D 1 d a g j 2 e b h k > merge(R1, R2, by.x = "A", by.y = "B") A B C D 1 c f f i > > > ################################################### > ### chunk number 23: data > ################################################### > #line 290 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > auteur <- data.frame( + nom = c("Tukey", "Venables", "Tierney", "Ripley", "McNeil"), + nationalite = c("USA", "Australie", "USA", "UK", "Australie"), + decede = c("oui", rep("non", 4))) > livre <- data.frame( + auteur = c("Tukey", "Venables", "Tierney", + "Ripley", "Ripley", "McNeil", "R Core"), + titre = c("Exploratory Data Analysis", + "Modern Applied Statistics", + "LISP-STAT", + "Spatial Statistics", "Stochastic Simulation", + "Interactive Data Analysis", + "An Introduction to R"), + coauteur = c(NA, "Ripley", NA, NA, NA, NA, + "Venables")) > > > ################################################### > ### chunk number 24: xtablexample > ################################################### > #line 308 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > library(xtable) > print(xtable(livre, caption = "La relation livre", label = "tlivre"), file = "tlivre.tex") > print(xtable(auteur, caption = "La relation auteur", label = "tauteur"), file = "tauteur.tex") > > > ################################################### > ### chunk number 25: rel > ################################################### > #line 319 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > #line 290 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > auteur <- data.frame( + nom = c("Tukey", "Venables", "Tierney", "Ripley", "McNeil"), + nationalite = c("USA", "Australie", "USA", "UK", "Australie"), + decede = c("oui", rep("non", 4))) > livre <- data.frame( + auteur = c("Tukey", "Venables", "Tierney", + "Ripley", "Ripley", "McNeil", "R Core"), + titre = c("Exploratory Data Analysis", + "Modern Applied Statistics", + "LISP-STAT", + "Spatial Statistics", "Stochastic Simulation", + "Interactive Data Analysis", + "An Introduction to R"), + coauteur = c(NA, "Ripley", NA, NA, NA, NA, + "Venables")) > #line 320 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > any(duplicated(livre)) [1] FALSE > any(duplicated(auteur)) [1] FALSE > > > ################################################### > ### chunk number 26: > ################################################### > #line 325 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > proj(subset(livre, auteur == "Ripley"), "titre") titre 4 Spatial Statistics 5 Stochastic Simulation > > > ################################################### > ### chunk number 27: > ################################################### > #line 329 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > proj(subset(livre, auteur == "Ripley" | coauteur == "Ripley"), c("auteur","titre")) auteur titre 2 Venables Modern Applied Statistics 4 Ripley Spatial Statistics 5 Ripley Stochastic Simulation > > > ################################################### > ### chunk number 28: > ################################################### > #line 333 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > proj(subset(livre, auteur %in% coauteur), "auteur") auteur 2 Venables 4 Ripley > > > ################################################### > ### chunk number 29: > ################################################### > #line 337 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > proj( subset(livre, auteur == names(which.max(table(auteur)))), "auteur") auteur 4 Ripley > > > ################################################### > ### chunk number 30: > ################################################### > #line 341 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > proj( subset(auteur, nationalite == names(which.min(table(nationalite)))), c("nom","nationalite")) nom nationalite 4 Ripley UK > > > ################################################### > ### chunk number 31: > ################################################### > #line 345 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > proj( subset(auteur, nationalite == "Australie" & decede == "non"), "nom") nom 2 Venables 5 McNeil > > > ################################################### > ### chunk number 32: nationalites > ################################################### > #line 349 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > proj(auteur, "nationalite") nationalite 1 USA 2 Australie 4 UK > > > ################################################### > ### chunk number 33: titreaust > ################################################### > #line 353 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > M <- merge(livre, auteur, by.x = "auteur", by.y = "nom") > proj(subset(M, nationalite == "Australie"), "titre") titre 1 Interactive Data Analysis 6 Modern Applied Statistics > > > ################################################### > ### chunk number 34: > ################################################### > #line 358 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > M <- merge(livre, auteur, by.x = "auteur", by.y = "nom") > proj(subset(M, nationalite == "USA" & decede == "non"), "titre") titre 4 LISP-STAT > > > ################################################### > ### chunk number 35: > ################################################### > #line 363 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > M <- merge(livre, auteur, by.x = "auteur", by.y = "nom") > proj(subset(M, titre == titre[which.min(sapply(titre, nchar))]), c("auteur", "nationalite")) auteur nationalite 1 McNeil Australie > > > ################################################### > ### chunk number 36: CLIENT > ################################################### > #line 394 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > CLIENT <- data.frame(nc = as.character(1:12), + nomc = c( + "Briche", "Brion", + "Celle", "Duron", + "Escalas", "Ferber", + "Le Braz", "Le Briz", + "Le Du", "Yildiz", + "Zoubida","Kéké"), + adrc = c( + "1 rue du vent", + "2 rue de la pluie", + "3 Impasse de la grêle", + "4 Bd de l'orage", + "10 imp. du tonnerre", + "20 rue de la peur", + "30 rue de l'angoisse", + "40 rue du stress", + "50 rue des phobies", + "13 rue porte-bonheur", + "38, rue Edmond Locard", + "1, rue du sommeil"), + nomvc = c( + "Sète", + "Bourg", + "Bourg", + "Paris", + "Bourg", + "Lyon", + "Lyon", + "Quimper", + "Troyes", + "Paris", + "Lyon", + "Douz") + ) > > > ################################################### > ### chunk number 37: CLIENT > ################################################### > #line 431 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > print(xtable(CLIENT, caption = "CLIENT", label = "CLIENT"), file = "CLIENT.tex") > > > ################################################### > ### chunk number 38: VILLE > ################################################### > #line 437 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > VILLE <- data.frame( + nomv = c( + "Abidjan", + "Bourg", + "Douz", + "Lille", + "Nîmes", + "Lyon", + "Paris", + "Quimper", + "Sète", + "Troyes"), + nbh = c( + 2000000, + 80000, + 15000, + 350000, + 70000, + 800000, + 4000000, + 65000, + 35000, + 120000)) > > > ################################################### > ### chunk number 39: VILLE > ################################################### > #line 462 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > print(xtable(VILLE, caption = "VILLE", label = "VILLE"), file = "VILLE.tex") > > > ################################################### > ### chunk number 40: FOURNISSEUR > ################################################### > #line 468 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > FOURNISSEUR <- data.frame(nf = as.character(1:6), + nomf = c( + "Kervella", + "Kervella", + "Le Guen", + "Ramirez", + "Soarez", + "Tahar"), + adrf = c( + "1 place Bayan", + "6 rue du pont", + "12 park nevez", + "24 bd d'armor", + "43 rue de Trion", + NA), + nomvf = c( + "Paris", + "Bourg", + "Bourg", + "Troyes", + "Lyon", + NA)) > > > ################################################### > ### chunk number 41: FOURNISSEUR > ################################################### > #line 492 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > print(xtable(FOURNISSEUR, caption = "FOURNISSEUR", label = "FOURNISSEUR"), file = "FOURNISSEUR.tex") > > > ################################################### > ### chunk number 42: TVA > ################################################### > #line 498 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > TVA <- data.frame( + Codetva = as.character(1:4), + taux = c(0,2,5.5,19.6)) > > > ################################################### > ### chunk number 43: TVA > ################################################### > #line 503 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > print(xtable(TVA, caption = "TVA", label = "TVA"), file = "TVA.tex") > > > ################################################### > ### chunk number 44: PRODUIT > ################################################### > #line 509 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > PRODUIT <- data.frame( np = as.character(1:10), + lib = c( + "actinidia", + "banane", + "coing", + "figue de barbarie", + "grenade", + "litchi", + "passion", + "plaquemine", + "kumquat", + "dattes"), + pu = c(0.15, 1.2, 0.5, 2.1, 1.3, 2.5, 4.0, 2.0, 4.25, 2.1), + codetvap = c( + "4", + "1", + "1", + "3", + "4", + "2", + "2", + "3", + "4", + "4"), + Couleur = c( + "kaki", + "jaune", + "jaune", + "vert", + "rouge", + "blanc", + "noir", + "orange", + "orange", + "dorée"), + nomvp = c( + "Nîmes", + "Abidjan", + "Sète", + "Bourg", + "Douz", + "Lyon", + "Brest", + "Nîmes", + "Douz", + "Douz")) > > > ################################################### > ### chunk number 45: PRODUIT > ################################################### > #line 557 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > print(xtable(PRODUIT, caption = "PRODUIT", label = "PRODUIT"), file = "PRODUIT.tex") > > > ################################################### > ### chunk number 46: FOURNIR > ################################################### > #line 563 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > FOURNIR <- data.frame( + nff = c( + "1", + "1", + "1", + "1", + "1", + "1", + "2", + "2", + "2", + "2", + "2", + "2", + "2", + "3", + "3", + "3", + "3", + "3", + "3", + "3", + "3", + "3", + "4", + "4", + "4", + "4", + "4", + "4", + "4", + "4", + "5", + "5", + "5", + "5", + "5", + "6"), + npf = c( + "1", + "3", + "5", + "6", + "7", + "9", + "1", + "2", + "3", + "4", + "5", + "6", + "9", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "9", + "3", + "4", + "5", + "6", + "7", + "10"), + qtef = c( + "4", + "3", + "2", + "1", + "4", + "3", + "2", + "1", + "4", + "3", + "2", + "1", + "4", + "3", + "2", + "1", + "4", + "3", + "2", + "1", + "4", + "3", + "2", + "1", + "4", + "3", + "2", + "1", + "4", + "3", + "2", + "1", + "4", + "3", + "2", + "2")) > > > ################################################### > ### chunk number 47: FOURNIR > ################################################### > #line 677 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > print(xtable(FOURNIR, caption = "FOURNIR", label = "FOURNIR"), file = "FOURNIR.tex") > > > ################################################### > ### chunk number 48: COMMANDER > ################################################### > #line 683 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > COMMANDER <- data.frame( + ncc = c( + "1", + "1", + "1", + "1", + "1", + "1", + "2", + "2", + "2", + "2", + "2", + "2", + "2", + "2", + "3", + "3", + "3", + "5", + "5", + "6", + "6", + "8", + "8", + "8", + "8", + "8", + "8", + "8", + "8", + "10", + "10", + "10", + "10", + "10", + "10", + "11", + "12", + "12"), + npc = c( + "2", + "3", + "5", + "6", + "7", + "9", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "9", + "4", + "5", + "6", + "1", + "9", + "5", + "9", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "9", + "1", + "2", + "4", + "6", + "7", + "9", + "10", + "5", + "10"), + qtec = c( + "1", + "3", + "2", + "1", + "3", + "2", + "1", + "3", + "2", + "1", + "3", + "2", + "1", + "3", + "2", + "1", + "3", + "2", + "1", + "3", + "3", + "2", + "1", + "3", + "2", + "1", + "3", + "2", + "1", + "3", + "2", + "1", + "3", + "2", + "1", + "1", + "1", + "5")) > > > ################################################### > ### chunk number 49: COMMANDER > ################################################### > #line 804 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > print(xtable(COMMANDER, caption = "COMMANDER", label = "COMMANDER"), file = "COMMANDER.tex") > > > ################################################### > ### chunk number 50: lnv > ################################################### > #line 813 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > proj(VILLE,"nomv") nomv 1 Abidjan 2 Bourg 3 Douz 4 Lille 5 Nîmes 6 Lyon 7 Paris 8 Quimper 9 Sète 10 Troyes > > > ################################################### > ### chunk number 51: llp > ################################################### > #line 818 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > proj(PRODUIT,"lib") lib 1 actinidia 2 banane 3 coing 4 figue de barbarie 5 grenade 6 litchi 7 passion 8 plaquemine 9 kumquat 10 dattes > > > ################################################### > ### chunk number 52: ncb > ################################################### > #line 823 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > proj(subset(CLIENT, nomvc == "Bourg"),"nomc") nomc 2 Brion 3 Celle 5 Escalas > > > ################################################### > ### chunk number 53: TailleDesVilles > ################################################### > #line 829 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > vdec <- VILLE[order(VILLE$nbh), ] > dotchart(vdec$nbh/10^6, labels = as.character(vdec$nomv), + main = "Nombre d'habitants des villes", + xlab = "Nombre d'habitants en millions") > abline(v=0.1, col = "red", lty = 2) > > > ################################################### > ### chunk number 54: vpmh > ################################################### > #line 836 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > proj(subset(VILLE, nbh > 100000), "nomv") nomv 1 Abidjan 4 Lille 6 Lyon 7 Paris 10 Troyes > > > ################################################### > ### chunk number 55: pdp > ################################################### > #line 842 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > pdec <- PRODUIT[order(PRODUIT$pu), ] > dotchart(pdec$pu, labels = as.character(pdec$lib), + main = "Prix des produits", + xlab = "Euro") > abline(v=2, col = "red", lty = 2) > > > ################################################### > ### chunk number 56: pascher > ################################################### > #line 849 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > proj(subset(PRODUIT, pu < 2), "lib") lib 1 actinidia 2 banane 3 coing 5 grenade > > > ################################################### > ### chunk number 57: namch > ################################################### > #line 854 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > proj(subset( merge(CLIENT, VILLE, by.x = "nomvc", by.y = "nomv"), nbh < 100000), c("nomc","adrc")) nomc adrc 1 Brion 2 rue de la pluie 2 Celle 3 Impasse de la grêle 3 Escalas 10 imp. du tonnerre 4 Kéké 1, rue du sommeil 10 Le Briz 40 rue du stress 11 Briche 1 rue du vent > > > ################################################### > ### chunk number 58: ndvk > ################################################### > #line 860 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > proj(subset(merge(merge(FOURNISSEUR, FOURNIR, by.x = "nf", by.y = "nff"), + PRODUIT, by.x = "npf", by.y = "np"), lib == "kumquat"), "nomvf") nomvf 33 Bourg 34 Paris 35 Troyes > > > ################################################### > ### chunk number 59: ccfb > ################################################### > #line 868 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > proj(subset(merge(merge(CLIENT,COMMANDER, by.x = "nc", by.y = "ncc"), + PRODUIT, by.x = "npc", by.y = "np"), lib == "figue de barbarie"), "nomc") nomc 14 Brion 15 Le Briz 16 Yildiz 17 Celle > > > ################################################### > ### chunk number 60: nncrc > ################################################### > #line 874 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > qqcmd <- proj(merge(CLIENT,COMMANDER, by.x = "nc", by.y = "ncc"),"nc")[,1] > proj(subset(CLIENT, !(nc %in% qqcmd)), c("nc","nomc")) nc nomc 4 4 Duron 7 7 Le Braz 9 9 Le Du > > > ################################################### > ### chunk number 61: nlpnc > ################################################### > #line 880 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > produitscommandes <- proj(merge(PRODUIT,COMMANDER, by.x = "np", by.y = "npc"),"np")[,1] > proj(subset(PRODUIT, !(np %in% produitscommandes)), c("np","lib")) np lib 8 8 plaquemine > > > ################################################### > ### chunk number 62: nnfa > ################################################### > #line 888 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > proj(subset(merge(merge(FOURNISSEUR,FOURNIR, by.x = "nf", by.y = "nff"), PRODUIT, by.x = "npf", by.y = "np"), lib=="actinidia"), c("nf","nomf")) nf nomf 1 1 Kervella 2 4 Ramirez 3 2 Kervella 4 3 Le Guen > > > ################################################### > ### chunk number 63: nnfpr > ################################################### > #line 894 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > r1 <- merge(FOURNISSEUR, FOURNIR, by.x = "nf", by.y = "nff") > r2 <- merge(r1, PRODUIT, by.x = "npf", by.y = "np") > proj( subset(r2, Couleur == "rouge"), c("nf","nomf")) nf nomf 18 1 Kervella 19 2 Kervella 20 5 Soarez 21 3 Le Guen 22 4 Ramirez > > > ################################################### > ### chunk number 64: nctva19 > ################################################### > #line 901 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > r1 <- merge(CLIENT, COMMANDER, by.x = "nc", by.y = "ncc") > r2 <- merge(r1, PRODUIT, by.x = "npc", by.y = "np") > r3 <- merge(r2, TVA, by.x = "codetvap", by.y = "Codetva") > not19 <- proj(subset(r3, taux != 19.6), "nc")[,1] > proj(subset(r3, !(nc %in% not19)), "nc") nc 21 5 25 12 26 11 29 6 > > > ################################################### > ### chunk number 65: nncpdlv > ################################################### > #line 910 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > r1 <- merge(CLIENT, COMMANDER, by.x = "nc", by.y = "ncc") > r2 <- merge(r1, PRODUIT, by.x = "npc", by.y = "np") > r3 <- subset(r2, as.character(nomvc) == as.character(nomvp)) > proj(r3, c("nc", "nomc")) nc nomc 5 12 Kéké 13 1 Briche 14 2 Brion 17 3 Celle > > > ################################################### > ### chunk number 66: nnccpfv > ################################################### > #line 919 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > r1 <- merge(CLIENT, COMMANDER, by.x = "nc", by.y = "ncc") > r2 <- merge(r1, PRODUIT, by.x = "npc", by.y = "np") > r3 <- merge(r2, FOURNIR, by.x = "npc", by.y = "npf") > r4 <- merge(r3, FOURNISSEUR, by.x = "nff", by.y = "nf") > proj(subset(r4, as.character(nomvc) == as.character(nomvf)), c("nc","nomc")) nc nomc 13 10 Yildiz 29 3 Celle 30 2 Brion 34 5 Escalas 143 6 Ferber > > > ################################################### > ### chunk number 67: nncpdvfdv > ################################################### > #line 929 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > r1 <- merge(CLIENT, COMMANDER, by.x = "nc", by.y = "ncc") > r2 <- merge(r1, PRODUIT, by.x = "npc", by.y = "np") > r3 <- merge(r2, FOURNIR, by.x = "npc", by.y = "npf") > r4 <- merge(r3, FOURNISSEUR, by.x = "nff", by.y = "nf") > proj(subset(r4, as.character(nomvc) == as.character(nomvf) + & as.character(nomvc) == as.character(nomvp)), c("nc","nomc")) nc nomc 29 3 Celle 38 2 Brion > > > ################################################### > ### chunk number 68: nnfpcn > ################################################### > #line 939 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > r1 <- merge(PRODUIT, COMMANDER, by.x = "np", by.y = "npc") > pcmd <- proj(r1,"np") > r2 <- merge(FOURNIR, FOURNISSEUR, by.x = "nff", by.y = "nf") > proj(subset(r2, !(npf %in% pcmd)), c("nff","nomf")) nff nomf 1 1 Kervella 7 2 Kervella 14 3 Le Guen 23 4 Ramirez 31 5 Soarez 36 6 Tahar > > > ################################################### > ### chunk number 69: ncqpb > ################################################### > #line 947 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr19//tdr19.rnw" > r1 <- merge(CLIENT, COMMANDER, by.x = "nc", by.y = "ncc") > r2 <- merge(r1, FOURNIR, by.x = "npc", by.y = "npf") > r3 <- merge(r2, FOURNISSEUR, by.x = "nff", by.y = "nf") > pasbourg <- proj(subset(r3, nomvf != "Bourg"), "nc")[,1] > proj(subset(r3, !(nc %in% pasbourg)), "nc") nc 156 11 > > > > proc.time() utilisateur système écoulé 1.040 0.048 1.176