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:47 2011" > ################################################### > ### chunk number 2: > ################################################### > #line 102 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > NA == NA [1] NA > > > ################################################### > ### chunk number 3: > ################################################### > #line 109 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > x <- c(NA, FALSE, TRUE) > names(x) <- as.character(x) > x FALSE TRUE NA FALSE TRUE > > > ################################################### > ### chunk number 4: > ################################################### > #line 115 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > nonx <- !(x) > nonx FALSE TRUE NA TRUE FALSE > > > ################################################### > ### chunk number 5: > ################################################### > #line 122 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > outer(x, x, "&") FALSE TRUE NA FALSE NA FALSE FALSE FALSE FALSE TRUE NA FALSE TRUE > > > ################################################### > ### chunk number 6: > ################################################### > #line 129 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > outer(x, x, "|") FALSE TRUE NA NA TRUE FALSE NA FALSE TRUE TRUE TRUE TRUE TRUE > > > ################################################### > ### chunk number 7: > ################################################### > #line 136 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > outer(x, x, "==") FALSE TRUE NA NA NA FALSE NA TRUE FALSE TRUE NA FALSE TRUE > > > ################################################### > ### chunk number 8: > ################################################### > #line 157 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > identical(NA,NA) [1] TRUE > identical(TRUE,TRUE) [1] TRUE > identical(FALSE,FALSE) [1] TRUE > > > ################################################### > ### chunk number 9: > ################################################### > #line 172 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > Pierre <- 1.90 > Paul <- 1.50 > Jacques <- NA > > > ################################################### > ### chunk number 10: > ################################################### > #line 183 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > Pierre > 2 [1] FALSE > > > ################################################### > ### chunk number 11: > ################################################### > #line 187 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > Pierre > Paul [1] TRUE > > > ################################################### > ### chunk number 12: > ################################################### > #line 191 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > Pierre > Jacques [1] NA > > > ################################################### > ### chunk number 13: > ################################################### > #line 195 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > identical(Pierre > Jacques, NA) [1] TRUE > > > ################################################### > ### chunk number 14: > ################################################### > #line 199 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > Pierre > 1 & Paul > 1 & Jacques > 1 [1] NA > > > ################################################### > ### chunk number 15: > ################################################### > #line 204 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > identical(Pierre > 1 & Paul > 1 & Jacques > 1, NA) [1] TRUE > > > ################################################### > ### chunk number 16: > ################################################### > #line 208 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > Pierre > 1 | Paul > 1 | Jacques > 1 [1] TRUE > > > ################################################### > ### chunk number 17: > ################################################### > #line 213 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > identical(Pierre > 1 | Paul > 1 | Jacques > 1, NA) [1] FALSE > > > ################################################### > ### chunk number 18: > ################################################### > #line 217 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > Jacques == Jacques [1] NA > > > ################################################### > ### chunk number 19: > ################################################### > #line 221 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > identical(Jacques == Jacques, TRUE) [1] FALSE > > > ################################################### > ### chunk number 20: > ################################################### > #line 225 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > identical(Jacques == Jacques, NA) [1] TRUE > > > ################################################### > ### chunk number 21: > ################################################### > #line 230 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > identical(identical(Jacques == Jacques, NA), TRUE) [1] TRUE > > > ################################################### > ### chunk number 22: > ################################################### > #line 246 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > NA == NA [1] NA > > > ################################################### > ### chunk number 23: > ################################################### > #line 269 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > (x1 <- 5/10 - 3/10) [1] 0.2 > (x2 <- 3/10 - 1/10) [1] 0.2 > x1 == x2 [1] FALSE > > > ################################################### > ### chunk number 24: > ################################################### > #line 275 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > format(x1, digits=22) [1] "0.2000000000000000111022" > format(x2, digits=22) [1] "0.1999999999999999833467" > x1 - x2 [1] 2.775558e-17 > > > ################################################### > ### chunk number 25: > ################################################### > #line 282 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > all.equal(x1,x2) [1] TRUE > > > ################################################### > ### chunk number 26: > ################################################### > #line 286 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > identical(all.equal(x1,x2), TRUE) [1] TRUE > > > ################################################### > ### chunk number 27: toto > ################################################### > #line 292 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > "%==%" <- function(x,y) identical(all.equal(x, y), TRUE) > x1 %==% x2 [1] TRUE > 1 %==% (1+.Machine$double.eps ^ 0.5) [1] TRUE > 1 %==% (1+2*(.Machine$double.eps ^ 0.5)) [1] FALSE > > > ################################################### > ### chunk number 28: > ################################################### > #line 304 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > NA + 1 [1] NA > 2*NA [1] NA > > > ################################################### > ### chunk number 29: > ################################################### > #line 312 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > mean(c(pi,NA)) [1] NA > mean(c(pi,NA), na.rm = TRUE) [1] 3.141593 > > > ################################################### > ### chunk number 30: > ################################################### > #line 324 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > pi [1] 3.141593 > is.vector(pi) [1] TRUE > > > ################################################### > ### chunk number 31: > ################################################### > #line 337 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > variance <- function(X) + { + n <- length(X) + sum1 <- 0 + for( i in seq(from = 1, to = n)) + {sum1 <- sum1 + X[i]} + moyenne <- sum1/n + sum2 <- 0 + for( i in seq(from = 1, to = n)) + {sum2 <- sum2 + (X[i] - moyenne)*(X[i] - moyenne)} + return(sum2/n) + } > > > ################################################### > ### chunk number 32: > ################################################### > #line 353 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > 1:10 [1] 1 2 3 4 5 6 7 8 9 10 > > > ################################################### > ### chunk number 33: > ################################################### > #line 357 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > variance(1:10) [1] 8.25 > > > ################################################### > ### chunk number 34: > ################################################### > #line 363 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > variance <- function(X) + { + n <- length(X) + moyenne <- sum(X)/n + return(sum((X-moyenne)^2)/n) + } > variance(1:10) [1] 8.25 > > > ################################################### > ### chunk number 35: > ################################################### > #line 380 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > (1:10)^2 [1] 1 4 9 16 25 36 49 64 81 100 > > > ################################################### > ### chunk number 36: > ################################################### > #line 384 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > (1:10)^2-1 [1] 0 3 8 15 24 35 48 63 80 99 > > > ################################################### > ### chunk number 37: > ################################################### > #line 388 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > (1:10)^3 [1] 1 8 27 64 125 216 343 512 729 1000 > > > ################################################### > ### chunk number 38: > ################################################### > #line 392 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > sin(1:10) [1] 0.8414710 0.9092974 0.1411200 -0.7568025 -0.9589243 -0.2794155 [7] 0.6569866 0.9893582 0.4121185 -0.5440211 > > > ################################################### > ### chunk number 39: > ################################################### > #line 396 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > 10^(1:10) [1] 1e+01 1e+02 1e+03 1e+04 1e+05 1e+06 1e+07 1e+08 1e+09 1e+10 > > > ################################################### > ### chunk number 40: > ################################################### > #line 400 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > log(10^(1:10)) [1] 2.302585 4.605170 6.907755 9.210340 11.512925 13.815511 16.118096 [8] 18.420681 20.723266 23.025851 > > > ################################################### > ### chunk number 41: > ################################################### > #line 404 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > log10(10^(1:10)) [1] 1 2 3 4 5 6 7 8 9 10 > > > ################################################### > ### chunk number 42: > ################################################### > #line 408 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > sqrt(1:10) [1] 1.000000 1.414214 1.732051 2.000000 2.236068 2.449490 2.645751 2.828427 [9] 3.000000 3.162278 > > > ################################################### > ### chunk number 43: > ################################################### > #line 412 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > sum(1:10) [1] 55 > > > ################################################### > ### chunk number 44: > ################################################### > #line 416 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > cumsum(1:10) [1] 1 3 6 10 15 21 28 36 45 55 > > > ################################################### > ### chunk number 45: > ################################################### > #line 420 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > prod(1:10) [1] 3628800 > > > ################################################### > ### chunk number 46: > ################################################### > #line 424 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > cumprod(1:10) [1] 1 2 6 24 120 720 5040 40320 362880 [10] 3628800 > > > ################################################### > ### chunk number 47: > ################################################### > #line 428 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > diff(1:10) [1] 1 1 1 1 1 1 1 1 1 > > > ################################################### > ### chunk number 48: > ################################################### > #line 442 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > notes <- c(15,8,14,12,14,10,18,15,9,5,12,13,12,16) > sort(notes) [1] 5 8 9 10 12 12 12 13 14 14 15 15 16 18 > length(notes) [1] 14 > min(notes) [1] 5 > max(notes) [1] 18 > range(notes) [1] 5 18 > median(notes) [1] 12.5 > quantile(notes) 0% 25% 50% 75% 100% 5.00 10.50 12.50 14.75 18.00 > mean(notes) [1] 12.35714 > var(notes) [1] 11.93956 > sd(notes) [1] 3.455367 > unique(notes) [1] 15 8 14 12 10 18 9 5 13 16 > sort(unique(notes)) [1] 5 8 9 10 12 13 14 15 16 18 > > > ################################################### > ### chunk number 49: affectation1 > ################################################### > #line 461 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > x <- 7 > > > ################################################### > ### chunk number 50: > ################################################### > #line 466 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > x [1] 7 > > > ################################################### > ### chunk number 51: > ################################################### > #line 472 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > (x <- 7) [1] 7 > > > ################################################### > ### chunk number 52: > ################################################### > #line 479 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > x <- 12 > > > ################################################### > ### chunk number 53: > ################################################### > #line 482 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > x [1] 12 > > > ################################################### > ### chunk number 54: > ################################################### > #line 496 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > ((1+sqrt(5))/2)^2 [1] 2.618034 > > > ################################################### > ### chunk number 55: > ################################################### > #line 506 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > ((1+sqrt(5))/2)^2 -> x > > > ################################################### > ### chunk number 56: > ################################################### > #line 510 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > x [1] 2.618034 > > > ################################################### > ### chunk number 57: affectation2 > ################################################### > #line 517 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > x = 7 > > > ################################################### > ### chunk number 58: > ################################################### > #line 524 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > system.time(x<-7) utilisateur système écoulé 0 0 0 > > > ################################################### > ### chunk number 59: serie > ################################################### > #line 548 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > x <-1:12 > > > ################################################### > ### chunk number 60: > ################################################### > #line 553 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > -5:5 [1] -5 -4 -3 -2 -1 0 1 2 3 4 5 > > > ################################################### > ### chunk number 61: > ################################################### > #line 560 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > seq(from = 1, to = 5) [1] 1 2 3 4 5 > seq(from = 1, to = 2, by = 0.1) [1] 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 > seq(from = 10, to = 50, length = 10) [1] 10.00000 14.44444 18.88889 23.33333 27.77778 32.22222 36.66667 41.11111 [9] 45.55556 50.00000 > seq(along = letters) [1] 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] 26 > > > ################################################### > ### chunk number 62: > ################################################### > #line 568 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > seq(from = 0,to = -5) [1] 0 -1 -2 -3 -4 -5 > seq(from = 0.01, to = 0.1, by = 0.01) [1] 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.10 > seq(1,3,le=4) [1] 1.000000 1.666667 2.333333 3.000000 > > > ################################################### > ### chunk number 63: repl > ################################################### > #line 576 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > rep(1:5, 2) [1] 1 2 3 4 5 1 2 3 4 5 > rep(1:5, length = 12) [1] 1 2 3 4 5 1 2 3 4 5 1 2 > rep(1:5, each = 2) [1] 1 1 2 2 3 3 4 4 5 5 > rep(c('un', 'deux'), c(6, 3)) [1] "un" "un" "un" "un" "un" "un" "deux" "deux" "deux" > > > ################################################### > ### chunk number 64: > ################################################### > #line 584 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > rep(1:3, 3) [1] 1 2 3 1 2 3 1 2 3 > rep(1:4, length = 12) [1] 1 2 3 4 1 2 3 4 1 2 3 4 > rep(1:4, each = 3) [1] 1 1 1 2 2 2 3 3 3 4 4 4 > rep(c("un", "deux"), c(3, 6)) [1] "un" "un" "un" "deux" "deux" "deux" "deux" "deux" "deux" > > > ################################################### > ### chunk number 65: combi > ################################################### > #line 594 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > x <- c(1.5,7.2,pi) > x <-c(1:3,10:12) > > > ################################################### > ### chunk number 66: > ################################################### > #line 600 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > c(11.1,2.7,3.3) [1] 11.1 2.7 3.3 > c(-5:1,1.1,88.77) [1] -5.00 -4.00 -3.00 -2.00 -1.00 0.00 1.00 1.10 88.77 > > > ################################################### > ### chunk number 67: > ################################################### > #line 606 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > x <- c(2,5,-3,8,"a") > > > ################################################### > ### chunk number 68: mode1 > ################################################### > #line 613 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > mode(x) [1] "character" > > > ################################################### > ### chunk number 69: mode2 > ################################################### > #line 618 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > x <- c(1,5,-36,3.66) > mode(x) [1] "numeric" > > > ################################################### > ### chunk number 70: mode3 > ################################################### > #line 624 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > x <- c(T,T,T,F,F) > mode(x) [1] "logical" > > > ################################################### > ### chunk number 71: scan1 eval=FALSE > ################################################### > ## #line 633 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > ## x<-scan() > > > ################################################### > ### chunk number 72: scan2 > ################################################### > #line 649 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > x <- c(145, -1, 28.88, 2e-02, 3.450e1 ) > > > ################################################### > ### chunk number 73: scan3 > ################################################### > #line 652 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > x [1] 145.00 -1.00 28.88 0.02 34.50 > > > ################################################### > ### chunk number 74: ele2 > ################################################### > #line 663 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > x[4] [1] 0.02 > > > ################################################### > ### chunk number 75: ele1 > ################################################### > #line 668 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > x[2:3] [1] -1.00 28.88 > > > ################################################### > ### chunk number 76: > ################################################### > #line 673 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > x[c(2,2,3)] [1] -1.00 -1.00 28.88 > > > ################################################### > ### chunk number 77: > ################################################### > #line 679 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > x[100] [1] NA > > > ################################################### > ### chunk number 78: ele2 > ################################################### > #line 686 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > x[-4] [1] 145.00 -1.00 28.88 34.50 > > > ################################################### > ### chunk number 79: > ################################################### > #line 691 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > x[-1] [1] -1.00 28.88 0.02 34.50 > > > ################################################### > ### chunk number 80: > ################################################### > #line 697 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > x[-length(x)] [1] 145.00 -1.00 28.88 0.02 > > > ################################################### > ### chunk number 81: > ################################################### > #line 707 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > x[-1][1:2] [1] -1.00 28.88 > > > ################################################### > ### chunk number 82: logique1 > ################################################### > #line 713 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > x[c(T,F,F,T,T)] [1] 145.00 0.02 34.50 > x[c(T,F)] [1] 145.00 28.88 34.50 > > > ################################################### > ### chunk number 83: > ################################################### > #line 722 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > x[c(F,T)] [1] -1.00 0.02 > > > ################################################### > ### chunk number 84: > ################################################### > #line 728 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > x > 10 [1] TRUE FALSE TRUE FALSE TRUE > x[x > 10] [1] 145.00 28.88 34.50 > x > 0 & x < 1 [1] FALSE FALSE FALSE TRUE FALSE > x[x > 0 & x < 1] [1] 0.02 > > > ################################################### > ### chunk number 85: > ################################################### > #line 737 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > x[ x < 50 & x > 10] [1] 28.88 34.50 > > > ################################################### > ### chunk number 86: consonnes > ################################################### > #line 746 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > (names(x) <- letters[1:5]) [1] "a" "b" "c" "d" "e" > > > ################################################### > ### chunk number 87: > ################################################### > #line 751 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > x[c("a","e")] a e 145.0 34.5 > > > ################################################### > ### chunk number 88: > ################################################### > #line 758 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > x[-match(c("a","e"), names(x))] b c d -1.00 28.88 0.02 > > > ################################################### > ### chunk number 89: > ################################################### > #line 763 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > letters[-match(c("a","e","i","o","u","y"), letters[1:26])] [1] "b" "c" "d" "f" "g" "h" "j" "k" "l" "m" "n" "p" "q" "r" "s" "t" "v" "w" "x" [20] "z" > > > ################################################### > ### chunk number 90: > ################################################### > #line 770 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > rev(1:10) [1] 10 9 8 7 6 5 4 3 2 1 > > > ################################################### > ### chunk number 91: > ################################################### > #line 775 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > rev(letters) [1] "z" "y" "x" "w" "v" "u" "t" "s" "r" "q" "p" "o" "n" "m" "l" "k" "j" "i" "h" [20] "g" "f" "e" "d" "c" "b" "a" > > > ################################################### > ### chunk number 92: vec9 > ################################################### > #line 780 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > sort(10:1) [1] 1 2 3 4 5 6 7 8 9 10 > > > ################################################### > ### chunk number 93: vec11 > ################################################### > #line 787 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > (x <- 10:1) [1] 10 9 8 7 6 5 4 3 2 1 > order(x) [1] 10 9 8 7 6 5 4 3 2 1 > x[order(x)] [1] 1 2 3 4 5 6 7 8 9 10 > all.equal(x[order(x)], sort(x)) [1] TRUE > > > ################################################### > ### chunk number 94: fac1 > ################################################### > #line 802 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > douleur <- c(0, 3, 2, 2, 1) > fdouleur <- factor(douleur, levels = 0:3) > is.numeric(fdouleur) [1] FALSE > is.character(fdouleur) [1] FALSE > is.factor(fdouleur) [1] TRUE > summary(fdouleur) 0 1 2 3 1 1 2 1 > table(fdouleur) fdouleur 0 1 2 3 1 1 2 1 > > > ################################################### > ### chunk number 95: > ################################################### > #line 816 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > levels(fdouleur) [1] "0" "1" "2" "3" > levels(fdouleur) <- c("rien", "leger", "moyen", "fort") > fdouleur [1] rien fort moyen moyen leger Levels: rien leger moyen fort > levels(fdouleur) [1] "rien" "leger" "moyen" "fort" > as.numeric(fdouleur) [1] 1 4 3 3 2 > > > ################################################### > ### chunk number 96: > ################################################### > #line 829 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > Z <- rnorm(25) > cut(Z, breaks = -3:3) [1] (-1,0] (-1,0] (0,1] (1,2] (-1,0] (1,2] (-2,-1] (-1,0] (0,1] [10] (0,1] (0,1] (-1,0] (-2,-1] (-1,0] (1,2] (-1,0] (-2,-1] (-1,0] [19] (-1,0] (-1,0] (-2,-1] (1,2] (0,1] (0,1] (0,1] Levels: (-3,-2] (-2,-1] (-1,0] (0,1] (1,2] (2,3] > > > ################################################### > ### chunk number 97: > ################################################### > #line 843 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > maliste <- list(a = pi, b = "une chaine", c = c(T,F,NA)) > maliste $a [1] 3.141593 $b [1] "une chaine" $c [1] TRUE FALSE NA > > > ################################################### > ### chunk number 98: > ################################################### > #line 853 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > maliste$a [1] 3.141593 > maliste[[1]] [1] 3.141593 > > > ################################################### > ### chunk number 99: > ################################################### > #line 861 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > maliste$b [1] "une chaine" > > > ################################################### > ### chunk number 100: > ################################################### > #line 865 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > maliste[[3]] [1] TRUE FALSE NA > > > ################################################### > ### chunk number 101: > ################################################### > #line 871 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > maliste$d <-1:10 > maliste $a [1] 3.141593 $b [1] "une chaine" $c [1] TRUE FALSE NA $d [1] 1 2 3 4 5 6 7 8 9 10 > > > ################################################### > ### chunk number 102: > ################################################### > #line 881 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > maliste <- maliste[-1] > maliste $b [1] "une chaine" $c [1] TRUE FALSE NA $d [1] 1 2 3 4 5 6 7 8 9 10 > > > ################################################### > ### chunk number 103: readtable > ################################################### > #line 896 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr13//tdr13.rnw" > t3var <- read.table("http://pbil.univ-lyon1.fr/R/donnees/t3var.txt", header=TRUE) Erreur dans file(file, "rt") : impossible d'ouvrir la connexion Calls: read.table -> file De plus : Message d'avis : In file(file, "rt") : ouverture impossible : le statut HTTP était '404 Not Found' Exécution arrêtée