-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathserver.R
44 lines (31 loc) · 846 Bytes
/
server.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
library(shiny)
library(sqldf)
# Define server logic required to summarize and view the
# selected dataset
# Define server logic required to summarize and view the
# selected dataset
shinyServer(function(input, output) {
datain<-reactive({
input$topic
})
output$summary<-renderTable({
if (datain()=='ALL'){
subset<-x4
}
else{
subset<-subX[subX$ID==datain(),]
}
subset2<-subset[order(subset$pvalue),]
subset2[c(1:5),]
})
output$histogram<-renderPlot({
if (datain()=='ALL'){
subset<-x4
}
else{
subset<-subX[subX$ID==datain(),]
}
subset2<-subset[order(-subset$pvalue),]
hist(-log(subset2$pvalue), breaks=100, xlab="-log10(p-value)", main="Mouse phenotypes to human disease test results",col="blue")
})
})