Skip to content

Commit

Permalink
MAINT: rename cluster/hierarchical UI. #31
Browse files Browse the repository at this point in the history
Also clean comments and fct prep for power calcs.
  • Loading branch information
fredjaya committed May 27, 2024
1 parent 2b271a8 commit 41e1ea1
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
12 changes: 12 additions & 0 deletions dev/test.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,18 @@ is_integer_col(simple, "NumInPool")
is.numeric(simple[["NumInPool"]])
```

### Power calculations

4 functions:
- `power_pool()`
- `sample_size_pool()`
- `power_pool_random()`
- `sample_size_pool_random()`

```{r}
PoolPoweR::power_pool
```




Expand Down
2 changes: 1 addition & 1 deletion server.R
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ server <- function(input, output, session) {
req(stratify_valid())
tagList(
tags$hr(style = "border-top: 1px solid #CCC;"),
checkboxInputTT("optsHierarchy", "Adjust for hierarchical sampling?",
checkboxInputTT("optsHierarchy", "Cluster/hierarchical sampling?",
tooltip = "Apply a hierarchical model to minimise overestimating confidence/credible intervals", value = FALSE
)
)
Expand Down
14 changes: 9 additions & 5 deletions ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ ui <- fluidPage(
## Main navbar and pages
navbarPage(paste0("PoolTools v", appVersion),
id = "main_nav",
## Home ----
tabPanel(
"Home",
fluidRow(
Expand All @@ -27,10 +28,12 @@ ui <- fluidPage(
)
)
),
## About ----
tabPanel(
"About",
includeMarkdown("inst/app/www/about.md")
),
## Analyse ----
tabPanel(
"Analyse",
h2("Analyse pooled data"),
Expand Down Expand Up @@ -75,6 +78,7 @@ ui <- fluidPage(
)
)
),
## Design ----
tabPanel(
"Design",
h2("Design a pooled survey"),
Expand All @@ -83,7 +87,7 @@ ui <- fluidPage(
sidebarPanel(
style = "max-height: 75vh; overflow-y: auto;",

# Survey options ------------------------------------
### Survey options ----
selectInputTT(
"optsMode",
"Analysis mode",
Expand All @@ -109,20 +113,20 @@ ui <- fluidPage(
),
checkboxInputTT(
"optsClustered",
"Clustered design?",
"Cluster/hierarchical sampling?",
tooltip = "tooltip",
value = TRUE
),

# Main settings -------------------------------------
### Main settings ----
# UI are conditional based on survey options
uiOutput("uiRandPrev"),
uiOutput("uiCost"),
uiOutput("uiParams"),
uiOutput("uiDesignAdv"),
textOutput("uiValidOther"),
uiOutput("btnDesign")
), # End of sidebarPanel ------------------------------
), ### End of sidebarPanel ----

mainPanel(
tabsetPanel(
Expand All @@ -138,7 +142,7 @@ ui <- fluidPage(
)
)
)
) # End of sidebarLayout -------------------------------
) ### End of sidebarLayout ----
)
)
)

0 comments on commit 41e1ea1

Please sign in to comment.