From 01ceb9be2d937f118d03130e82ae761f05b78bf5 Mon Sep 17 00:00:00 2001 From: kappelmann Date: Thu, 28 Nov 2019 17:48:20 +0100 Subject: [PATCH] Included sample sizes of respective nested RCTs --- server.R | 10 +++++++++- ui.R | 13 +++++++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/server.R b/server.R index 9ba732f..76491cf 100644 --- a/server.R +++ b/server.R @@ -60,13 +60,21 @@ server <- function(input, output) { }) - output$n_strat <- renderText({ + output$n_traditional <- renderText({ temp <- npRCT() as.character(temp$n_strat) }) + + output$n_precision <- renderText({ + + temp <- npRCT() + as.character(temp$n_total - temp$n_strat) + + }) + output$n_saved <- renderText({ temp <- npRCT() diff --git a/ui.R b/ui.R index 03a7571..11a8e44 100644 --- a/ui.R +++ b/ui.R @@ -53,8 +53,17 @@ body <- dashboardBody( h3("Total Sample Size"), textOutput("n_total"), - h3("Point of Stratification"), - textOutput("n_strat"), + h3("Sample Sizes of nested RCTs"), + + h4("Traditional RCT"), + textOutput("n_traditional"), + + icon("chevron circle down", align = "center"), + + h4("Precision RCT"), + textOutput("n_precision"), + + h3("Saved Sample Size"), textOutput("n_saved")