-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.R
More file actions
69 lines (59 loc) · 1.84 KB
/
Copy pathserver.R
File metadata and controls
69 lines (59 loc) · 1.84 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
library(PogromcyDanych)
library(ggplot2)
library(dplyr)
shinyServer(function(input, output){
output$trend <- renderPlot({
wybranySerial <- input$wybranySerial
serial <- filter(serialeIMDB, serial == wybranySerial)
pl <- ggplot(serial, aes(id, ocena, size=glosow, color=sezon)) +
geom_point() + xlab("Numer odcinka")
if(input$liniaTrendu)
pl <- pl + geom_smooth(se=FALSE, method="lm", size=3)
pl
})
output$model <- renderPrint({
wybranySerial <- input$wybranySerial
serial <- filter(serialeIMDB, serial == wybranySerial)
summary(lm(ocena~id, serial))
})
raw_input <- reactive({
if (!is.null(input[["input_z_danymi"]]))
input_curves <- serialeIMDB
input[["use_example"]]
isolate({
if (!is.null(input[["use_example"]]))
if(input[["use_example"]] > 0)
input_curves <- serialeIMDB
})
if(exists("input_curves")) {
input_curves
} else {
NULL
}
})
output$przykład <-renderUI({
if(is.null(raw_input())) {
tabsetPanel(
tabPanel(title = "Data input",
fluidRow(
# column(width = 5,
# fileInput('input_z_danymi', "Submit amplification data (.rdml, .csv or .xls file):")
# ),
column(width = 5,
p("Test application with the example amplification data"),
actionButton("use_example", "Load example")
),
tags$style(type='text/css', "#use_example { width:100%; margin-top: -5px;}")
)
)
)
} else {
tabsetPanel(
tabPanel(title = "Super_wynik",
plotOutput("trend")),
tabPanel(title = "tak",
verbatimTextOutput("model"))
)
}
})
})