forked from statwonk/openfda-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontrols.R
More file actions
20 lines (19 loc) · 744 Bytes
/
controls.R
File metadata and controls
20 lines (19 loc) · 744 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
output$drugs <- renderUI({
selectInput("drug", label = "Choose up to four drugs (generic names)",
choices = (tbl_df(
fda_query("/drug/event.json") %>%
fda_count("patient.drug.openfda.generic_name") %>%
fda_limit(1000) %>%
fda_exec()) %>%
arrange(term) %>%
filter(nchar(term) > 4))$term,
selected = c("oxycodone",
"acetaminophen",
"naproxen",
"aspirin"), multiple = T)
})
output$data_retrieval_button <- renderUI({
actionButton("run_button",
label = "Retrieve data",
class="btn btn-warning")
})