-
Notifications
You must be signed in to change notification settings - Fork 0
/
Outlier analysis.R
62 lines (46 loc) · 2.05 KB
/
Outlier analysis.R
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
Liver_check <-as.data.frame(parameters[,18])
Liver_check[,2]<- 1:2000
Liver_check[,3]<-metabolised_data_frame
#Liver_check[,4]<- parameters[,49]
#Liver_check[,5]<- parameters[,17]
colnames(Liver_check) <-c("V_L","id","percentage")#,"vsmax","fat")
melt_liver_check<-melt(Liver_check,id=c("percentage"))
melt_liver_check<-melt_liver_check[c(1:2000),c(1:3)]
melt_liver_check[,4]<-1:2000
colnames(melt_liver_check) <-c("percentage","variable","value","id")
melt_liver_check$id[melt_liver_check$id == 1:1000] <- "Male"
melt_liver_check$id[melt_liver_check$id == 1001:2000] <- "Female"
p<-ggplot(melt_liver_check, aes(x=value, y=percentage,colour=id)) +
geom_point(alpha=0.6)+
scale_color_manual(values = c( "Male" = "blue",
"Female" = "red"),
labels= c( "Male", "Female"),
name= "Sex")+
labs(x='Volume liver in L', y='Percentage metabolised', title='intersex differences human')+
theme_classic()+
theme(axis.title = element_text(size=14),
axis.text = element_text(size = 12),
legend.position = "top",
title = element_text(size=20))
ggplotly(p)
Q_C_check <-metabolised_data_frame
Q_C_check[,2] <- parameters[,26]
colnames(Q_C_check) <-c("percentage","Q_C")
melt_Q_C_check<-melt(Q_C_check,id=c("percentage"))
melt_Q_C_check[,4]<-1:2000
colnames(melt_Q_C_check) <-c("percentage","variable","value","id")
melt_Q_C_check$id[melt_Q_C_check$id == 1:1000] <- "Male"
melt_Q_C_check$id[melt_Q_C_check$id == 1001:2000] <- "Female"
p<-ggplot(melt_Q_C_check, aes(x=value, y=percentage,colour=id)) +
geom_point()+
scale_color_manual(values = c( "Male" = "blue",
"Female" = "red"),
labels= c( "Male", "Female"),
name= "Sex")+
labs(x='Cardiac output', y='Percentage metabolised', title='Intrasex differences human')+
theme_classic()+
theme(axis.title = element_text(size=14),
axis.text = element_text(size = 12),
legend.position = "top",
title = element_text(size=20))
ggplotly(p)