forked from mndrake/shinydashboard_app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
server.R
43 lines (31 loc) · 1.13 KB
/
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
library(shiny)
library(shinydashboard)
library(datasets)
Logged = FALSE;
PASSWORD <- data.frame(Brukernavn = "withr", Passord = "25d55ad283aa400af464c76d713c07ad")
# Define server logic required to summarize and view the selected dataset
shinyServer(function(input, output) {
source("www/Login.R", local = TRUE)
observe({
if (USER$Logged == TRUE) {
output$searchText <- renderUI(textInput(inputId = "search", label = "search terms", value=""))
output$menu <- renderMenu({
sidebarMenu(
menuItem("Dashboard", tabName = "dashboard", icon = icon("dashboard")),
menuItem("Widgets", tabName = "widgets", icon = icon("th"))
)
})
output$obs <- renderUI({
sliderInput("obs", "Number of observations:",
min = 10000, max = 90000,
value = 50000, step = 10000)
})
output$distPlot <- renderPlot({
dist <- NULL
dist <- rnorm(input$obs)
hist(dist, breaks = 100, main = paste("Your password:", input$passwd))
})
} else {
}
})
})