-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathapp.R
73 lines (57 loc) · 1.9 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
library(shiny)
#library(shinythemes)
library(shinyjs)
library(plotly)
library(shinydashboard)
library(jsonlite)
library(here)
library(ggplot2)
library(tibble)
library(stringr)
library(forcats)
library(lubridate)
library(purrr)
library(tidyr)
library(dplyr)
library(gt)
library(readxl)
library(postgresr)
library(ggthemes)
options(dplyr.summarise.inform = FALSE)
options(dplyr.warning.inform = FALSE)
country <- "Tanzania" # Tanzania, all
study <- "RCT" # Optimisation, RCT, WASH, Pilot
source("config/credentials_file.R")
source(here("Metabase Functions.R"))
if (study == "WASH"){
source("Metabase Analysis Setup.R")
source("serifat_functions.R")
source("serifat_wash_setup.R")
source("serifat_main.R")
source("serifat_shinyapp.R")
shinyApp(ui = ui, server = server)
#source(here("Metabase ShinyApp.R"))
#source(here("Metabase Pre-Shiny Setup.R"))
#parentapp_shiny(country = country, study = study)
} else {
source(here("Metabase ShinyApp.R"))
source(here("Metabase Pre-Shiny Setup.R"))
parentapp_shiny(country = country, study = study)
}
#source(here("Metabase ShinyApp Demo.R"))
# Please use `all_of(var)` (or `any_of(var)`) instead of `.data[[var]]`
# move to be like shiny 2 with the easy to read function
# TODO: run shiny app. Look at output prints.
# See time difference from nothing to "first"
# then "first" to "last"
# then for the observe() times (17 secs?)
# 2: 14.79
# try shinyapp 2 without the other tabs start ui stuff vs shinyapp 2
# 26 secs vs 10 secs
# on second tab, for "3", not "4":
# `mutate_all()` ignored the following grouping variables:
#* Columns `Support`, `Skin`
#i Use `mutate_at(df, vars(-group_cols()), myoperation)` to silence the message.
# on third tab - we run "3" twice (3, 3, 4)
# third tab - relax - 3, 4, and then a warning for shape palette. Then we keep running 4, again and again and again. And again.
# re-run 3, 4 for each tab. Is this ok? I think so.