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:00 2011" > ################################################### > ### chunk number 2: t2 > ################################################### > #line 102 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr1b//tdr1b.rnw" > w1 <- c("1/09/1962", "31/8/1968", "10/04/1972", "16/09/1978", + "11/06/1981", "21/06/1990", "28/02/1997", "10/05/1997") > w1 [1] "1/09/1962" "31/8/1968" "10/04/1972" "16/09/1978" "11/06/1981" [6] "21/06/1990" "28/02/1997" "10/05/1997" > > > ################################################### > ### chunk number 3: t3 > ################################################### > #line 109 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr1b//tdr1b.rnw" > w2 <- strptime(w1,"%d/%m/%Y") > class(w2) [1] "POSIXlt" "POSIXt" > unclass(w2) $sec [1] 0 0 0 0 0 0 0 0 $min [1] 0 0 0 0 0 0 0 0 $hour [1] 0 0 0 0 0 0 0 0 $mday [1] 1 31 10 16 11 21 28 10 $mon [1] 8 7 3 8 5 5 1 4 $year [1] 62 68 72 78 81 90 97 97 $wday [1] 6 6 1 6 4 4 5 6 $yday [1] 243 243 100 258 161 171 58 129 $isdst [1] 0 0 0 1 1 1 0 1 > apropos("POSIXlt") [1] "as.data.frame.POSIXlt" "as.Date.POSIXlt" "as.double.POSIXlt" [4] "as.matrix.POSIXlt" "as.POSIXct.POSIXlt" "as.POSIXlt" [7] "as.POSIXlt.character" "as.POSIXlt.date" "as.POSIXlt.Date" [10] "as.POSIXlt.dates" "as.POSIXlt.default" "as.POSIXlt.factor" [13] "as.POSIXlt.numeric" "as.POSIXlt.POSIXct" "c.POSIXlt" [16] ".__C__POSIXlt" "duplicated.POSIXlt" "format.POSIXlt" [19] "is.na.POSIXlt" "length.POSIXlt" "mean.POSIXlt" [22] "names<-.POSIXlt" "names.POSIXlt" ".POSIXlt" [25] "[<-.POSIXlt" "[.POSIXlt" "print.POSIXlt" [28] "rep.POSIXlt" "sort.POSIXlt" "summary.POSIXlt" [31] "Summary.POSIXlt" "unique.POSIXlt" "xtfrm.POSIXlt" > > > ################################################### > ### chunk number 4: t4 > ################################################### > #line 142 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr1b//tdr1b.rnw" > weekdays(w2) [1] "samedi" "samedi" "lundi" "samedi" "jeudi" "jeudi" "vendredi" [8] "samedi" > months(w2) [1] "septembre" "août" "avril" "septembre" "juin" "juin" [7] "février" "mai" > quarters(w2) [1] "Q3" "Q3" "Q2" "Q3" "Q2" "Q2" "Q1" "Q2" > julian(w2) Time differences in days [1] -2679.0417 -488.0417 829.9583 3179.9167 4178.9167 7475.9167 9919.9583 [8] 9990.9167 attr(,"tzone") [1] "" attr(,"origin") [1] "1970-01-01 GMT" > as.numeric(julian(w2)) [1] -2679.0417 -488.0417 829.9583 3179.9167 4178.9167 7475.9167 9919.9583 [8] 9990.9167 > class(julian(w2)) [1] "difftime" > > > ################################################### > ### chunk number 5: t5 > ################################################### > #line 151 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr1b//tdr1b.rnw" > w3 <- + diff(as.numeric(julian(w2))) > > > ################################################### > ### chunk number 6: t6 > ################################################### > #line 156 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr1b//tdr1b.rnw" > julian(strptime("1970-01-01","%F")) Time difference of -0.04166667 days > julian(strptime("1970-01-01 01:00","%F %R")) Time difference of 0 days > julian(strptime("1970-01-01 02:00","%F %R")) Time difference of 0.04166667 days > julian(strptime("1970-01-01 01:01","%F %R")) Time difference of 0.0006944444 days > > > ################################################### > ### chunk number 7: t7 > ################################################### > #line 173 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr1b//tdr1b.rnw" > strftime(w2,"%A %d %m %y") [1] "samedi 01 09 62" "samedi 31 08 68" "lundi 10 04 72" [4] "samedi 16 09 78" "jeudi 11 06 81" "jeudi 21 06 90" [7] "vendredi 28 02 97" "samedi 10 05 97" > as.character(w2,"%A %d %m %y") [1] "samedi 01 09 62" "samedi 31 08 68" "lundi 10 04 72" [4] "samedi 16 09 78" "jeudi 11 06 81" "jeudi 21 06 90" [7] "vendredi 28 02 97" "samedi 10 05 97" > > > ################################################### > ### chunk number 8: t8 > ################################################### > #line 192 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr1b//tdr1b.rnw" > as.character (w2,"%A %d %B %y") [1] "samedi 01 septembre 62" "samedi 31 août 68" "lundi 10 avril 72" [4] "samedi 16 septembre 78" "jeudi 11 juin 81" "jeudi 21 juin 90" [7] "vendredi 28 février 97" "samedi 10 mai 97" > as.character (w2,"%a %d %b %y") [1] "sam. 01 sept. 62" "sam. 31 août 68" "lun. 10 avril 72" "sam. 16 sept. 78" [5] "jeu. 11 juin 81" "jeu. 21 juin 90" "ven. 28 févr. 97" "sam. 10 mai 97" > > > ################################################### > ### chunk number 9: t9 > ################################################### > #line 199 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr1b//tdr1b.rnw" > as.character(strptime("04-07-1993","%d-%m-%Y"),"%A %Y/%m/%d") [1] "dimanche 1993/07/04" > > > ################################################### > ### chunk number 10: t10 > ################################################### > #line 207 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr1b//tdr1b.rnw" > wcar <- "25 12 2003 24 00 00" > wlt <- strptime (wcar, "%d %m %Y %H %M %S") > wlt [1] NA > > > ################################################### > ### chunk number 11: t11 > ################################################### > #line 215 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr1b//tdr1b.rnw" > wcar <- "25 12 2003 23 59 59" > wlt <- strptime(wcar, "%d %m %Y %H %M %S") > wlt [1] "2003-12-25 23:59:59" > unlist(unclass(wlt)) sec min hour mday mon year wday yday isdst 59 59 23 25 11 103 4 358 0 > > > ################################################### > ### chunk number 12: t12 > ################################################### > #line 224 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr1b//tdr1b.rnw" > wct <- as.POSIXct(wlt) > wct [1] "2003-12-25 23:59:59 CET" > attributes(wct) $class [1] "POSIXct" "POSIXt" $tzone [1] "" > > > ################################################### > ### chunk number 13: t13 > ################################################### > #line 232 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr1b//tdr1b.rnw" > unclass(wct) [1] 1072393199 attr(,"tzone") [1] "" > print(julian(wlt),dig=20) Time difference of 12411.958321759258979 days > print(1072393199/60/60/24,dig=20) [1] 12411.958321759258979 > > > ################################################### > ### chunk number 14: t14 > ################################################### > #line 240 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr1b//tdr1b.rnw" > wlt [1] "2003-12-25 23:59:59" > wlt+1 [1] "2003-12-26 CET" > wlt+2 [1] "2003-12-26 00:00:01 CET" > c(wlt, wlt+1,wlt+2) [1] "2003-12-25 23:59:59 CET" "2003-12-26 00:00:00 CET" [3] "2003-12-26 00:00:01 CET" > c(wct,wct+1,wct+2) [1] "2003-12-25 23:59:59 CET" "2003-12-26 00:00:00 CET" [3] "2003-12-26 00:00:01 CET" > > > ################################################### > ### chunk number 15: t15 > ################################################### > #line 251 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr1b//tdr1b.rnw" > d1 <- julian(strptime("15/09/2004","%d/%m/%Y")) > d2 <- julian(strptime("03/07/2005","%d/%m/%Y")) > as.numeric(d2-d1) [1] 291 > > > ################################################### > ### chunk number 16: t16 > ################################################### > #line 258 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr1b//tdr1b.rnw" > ISOdate(2004,9,15) [1] "2004-09-15 12:00:00 GMT" > ISOdate(2004,9,15)-ISOdate(2005,7,3) Time difference of -291 days > > > ################################################### > ### chunk number 17: t17 > ################################################### > #line 264 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr1b//tdr1b.rnw" > library(ade4) Attachement du package : 'ade4' The following object(s) are masked from 'package:base': within > f1 <- function(k) { + w <-sort(c(-2679.1,runif(6,-2671.1,9990.9),9990.9)) + return(sd(diff(w))) + } > wt <- as.randtest(sim = unlist(lapply(1:999,f1)),sd(diff(julian(w2)))) > wt Monte-Carlo test Call: as.randtest(sim = unlist(lapply(1:999, f1)), obs = sd(diff(julian(w2)))) Observation: 1078.111 Based on 999 replicates Simulated p-value: 0.898 Alternative hypothesis: greater Std.Obs Expectation Variance -1.153262 1593.290367 199553.971902 > plot(wt,nclass=20) > > > ################################################### > ### chunk number 18: t18 > ################################################### > #line 288 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr1b//tdr1b.rnw" > download.file("http://pbil.univ-lyon1.fr/R/donnees/coxlewisan1.txt","coxlewisan1.txt",mode="wb") essai de l'URL 'http://pbil.univ-lyon1.fr/R/donnees/coxlewisan1.txt' Erreur dans download.file("http://pbil.univ-lyon1.fr/R/donnees/coxlewisan1.txt", : impossible d'ouvrir l'URL 'http://pbil.univ-lyon1.fr/R/donnees/coxlewisan1.txt' De plus : Message d'avis : In download.file("http://pbil.univ-lyon1.fr/R/donnees/coxlewisan1.txt", : ouverture impossible : le statut HTTP était '404 Not Found' Exécution arrêtée