-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.R
More file actions
34 lines (28 loc) · 902 Bytes
/
Copy pathserver.R
File metadata and controls
34 lines (28 loc) · 902 Bytes
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
# Rely on the 'WorldPhones' dataset in the datasets
# package (which generally comes preloaded).
library(datasets)
# Define a server for the Shiny app
function(input, output) {
# Fill in the spot we created for a plot
output$phonePlot <- renderPlot({
i<-2
if(input$region > 50 && input$region < 60){
i <- 1
}else if(input$region > 60 && input$region < 70){
i <- 2
}else if(input$region > 70 && input$region < 80){
i <- 3
}else if(input$region > 80 && input$region < 90){
i <- 4
}else if(input$region > 60 && input$region < 65){
i <- 5
}else if(input$region > 65 && input$region <= 68){
i <- 6
}
# Render a barplot faithful[,2]
plot(WorldPhones[,i],
main="Rate Trends",
ylab="Interest Rates",
xlab="Year")
})
}