-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.R
55 lines (46 loc) · 1.67 KB
/
app.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
#
# This is a Shiny web application. You can run the application by clicking
# the 'Run App' button above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
source("db.R")
source("email.R")
source("qualtrics.R")
source("matched-pairs.R")
# Define UI for application that draws a histogram
ui <- fluidPage(
# Application title
titlePanel("HELLO AMERICA HERE COMES GOD"),
# Sidebar with a slider input for number of bins
sidebarLayout(
sidebarPanel(
actionButton("email", "Send Email")
),
# Show a plot of the generated distribution
mainPanel(
textInput("feedback", h3("Feedback"), placeholder="Optional text to go in the report")
#tabsetPanel(
#tabPanel("Report", tags$iframe(style="height:600px; width:100%", src="http://localhost/ressources/pdf/R-Intro.pdf"))
#tabPanel("hist", plotOutput("distPlot"), textInput("feedback", h3("Feedback"), placeholder="Optional text to go in the report")),
#tabPanel("text", h1("JESUS"))
#)
)
)
)
# Define server logic required to draw a histogram
server <- function(input, output) {
observeEvent(input$email, {
params <- calcPair(
mapAdvisorQualtricsResults(fetchResponse("SV_dcXVPtf3N55z3ng","R_3Ic7LXPYQFHbLd4")),
mapAdviseeQualtricsResults(fetchResponse("SV_9BjFOsJZkUxX7dc","R_1DqGryQbOjdZpxb")))
params$feedback <- input$feedback
rmarkdown::render("New.Rmd", output_file="report.pdf", params = params)
#send(output$distplot, input$emailText)
})
}
# Run the application
shinyApp(ui = ui, server = server)