-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsite.R
More file actions
82 lines (43 loc) · 1.75 KB
/
site.R
File metadata and controls
82 lines (43 loc) · 1.75 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
library ("plyr")
library ("ggplot2")
library ("reshape")
library ("xtable")
library("XML")
#####données rougeole
data <- readHTMLTable ("http://www.bag.admin.ch/k_m_meldesystem/00733/00813/index.html?webgrab_path=aHR0cDovL3d3dy5iYWctYW53LmFkbWluLmNoL2luZnJlcG9ydGluZy9kYXRlbmRldGFpbHMvZi9tYXNlcm4uaHRt&lang=fr",which = 6, header = TRUE)
dd1 <-data[-1, ]
names(dd1)[names(dd1)==""] <- "cantons"
str(dd1)
names(dd1[,1])<-"Cantons"
dd1[,c(2,12)]
plot(dd1)
str(dd1)
dd2<-melt(dd1, id="cantons")
ggplot(dd2,aes(dd2$cantons,dd2$value))+geom_histogram()+facet_grid(~ dd2$variable)
str(dd2)
dd2$value<-as.numeric(as.character(dd2$value))
write.csv(dd2, file = "dd2.csv",fileEncoding = "mac")
##############################################################################
qplot(variable,value, data = dd2, geom = "histogram")+ facet_wrap(~ cantons)
##############################################################################
qplot(variable,value, data = dd2, geom = "histogram")+ facet_wrap(~ cantons)+ opts(title = "Evaluation journée Genre 2011",axis.text.x=theme_text(angle=50),hjust=0)
ggplot(dd2,aes(variable,value))+geom_histogram()+facet_wrap(~cantons)
################################################
#################################################
data <- readHTMLTable ("http://www.encyclopedia-titanica.org/titanic-survivors/",skip.rows = integer(1),which = 1, header = TRUE)
y<-"http://www.encyclopedia-titanica.org/titanic-survivors/"
qw<-readHTMLTable (y,header = TRUE,sep=":")
summary(qw)
fd<-as.data.frame(qw)
summary(fd)
plot(fd)
#############
######plyr#########
#############
?baseball
pieces <- split(baseball[,6:9], baseball$year)
summary(pieces[1:10])
print (baseball)
summary(esoph)
plot(print.table(summary(esoph)))
plot(esoph)