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:14:30 2011" > ################################################### > ### chunk number 2: > ################################################### > #line 74 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr24//tdr24.rnw" > set.seed(01071966) #magic value for reproducibility > > > ################################################### > ### chunk number 3: > ################################################### > #line 92 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr24//tdr24.rnw" > library(MASS) > w <- mvrnorm(n = 100, mu = c(0,0), Sig = matrix( c(1,0.75,0.75,1), 2, 2)) > w <- data.frame(w) > names(w) <- c("x","y") > > > ################################################### > ### chunk number 4: plt1 > ################################################### > #line 101 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr24//tdr24.rnw" > plot(w, las = 1) > points(mean(w$x),mean(w$y), pch=20, cex=2) > > > ################################################### > ### chunk number 5: > ################################################### > #line 108 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr24//tdr24.rnw" > #line 101 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr24//tdr24.rnw" > plot(w, las = 1) > points(mean(w$x),mean(w$y), pch=20, cex=2) > #line 109 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr24//tdr24.rnw" > abline(lm(w$y~w$x)) > segments(w$x,w$y,w$x,predict(lm(w$y~w$x))) > > > ################################################### > ### chunk number 6: > ################################################### > #line 116 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr24//tdr24.rnw" > #line 101 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr24//tdr24.rnw" > plot(w, las = 1) > points(mean(w$x),mean(w$y), pch=20, cex=2) > #line 117 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr24//tdr24.rnw" > a0 <- coefficients(lm(w$x~w$y)) > abline(-a0[1]/a0[2],1/a0[2]) > segments(w$x,w$y,predict(lm(w$x~w$y)),w$y) > > > ################################################### > ### chunk number 7: > ################################################### > #line 125 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr24//tdr24.rnw" > plot(w,asp=1) # justifier ce choix > points(mean(w$x),mean(w$y),pch=20,cex=2) > cov <- var(w) > u <- eigen(cov,sym=T)$vectors[,1] > p <- u[2]/u[1] > abline(c(mean(w$y)-p*mean(w$x),p)) > scal <- (w$x-mean(w$x))*u[1]+(w$y-mean(w$y))*u[2] > abline(c(mean(w$y)-p*mean(w$x),p)) > segments(w$x,w$y,mean(w$x)+scal*u[1],mean(w$y)+scal*u[2]) > > > ################################################### > ### chunk number 8: > ################################################### > #line 140 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr24//tdr24.rnw" > library(ade4) Attachement du package : 'ade4' The following object(s) are masked from 'package:base': within > pca1 <- dudi.pca(w, scal=FALSE, scann=FALSE, nf = 2) > plot(pca1$li,asp=1, las = 1) > abline(h=0) > abline(v=0) > s.arrow(pca1$c1,add.p=TRUE) > > > ################################################### > ### chunk number 9: > ################################################### > #line 157 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr24//tdr24.rnw" > locus <- read.table("http://pbil.univ-lyon1.fr/R/donnees/locus.txt", + header =TRUE, row.names = 1) 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