Skip to content

Commit

Permalink
Merge pull request #49 from priism-center/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
gperrett committed Jan 10, 2024
2 parents 7c9c583 + 09a2389 commit 8269056
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions thinkCausal/R/mod_analysis_balance.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ mod_analysis_balance_ui <- function(id){
),
selectInput(inputId = ns('analysis_balance_select'),
label = 'Filter variables in balance plot:',
choices = c('Plot varibables with most imbalance',
choices = c('Plot variables with most imbalance',
'Manually select variables to plot')
),
# checkboxInput(ns('analysis_balance_show_table'),
# label = 'Show balance table',
# value = TRUE
# ),
conditionalPanel(condition = "input.analysis_balance_select == 'Plot varibables with most imbalance'",
conditionalPanel(condition = "input.analysis_balance_select == 'Plot variables with most imbalance'",
ns = ns,
sliderInput(ns('analysis_balance_cat'),
label = 'Categorical variables in balance plot:',
Expand Down
4 changes: 2 additions & 2 deletions thinkCausal/R/mod_learn_fundamental.R
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@ mod_learn_fundamental_server <- function(id){
ns <- session$ns

# load in everything we need
datImputed <- readr::read_csv('inst/extdata/fundamental_table2.csv') %>%
datImputed <- readr::read_csv(app_sys('extdata/fundamental_table2.csv')) %>%
dplyr::mutate(estITE = Y1 - Y0)
datTruth <- readr::read_csv('inst/extdata/truth.csv')
datTruth <- readr::read_csv(app_sys('extdata/truth.csv'))
datCombined <- data.frame(
datImputed[, 1:3],
estY0 = datImputed$Y0,
Expand Down
6 changes: 3 additions & 3 deletions thinkCausal/R/mod_learn_versionA.R
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ mod_learn_versionA_server <- function(id){
imputedY0 <- "#2297E6"
imputedY1 <- "#DF536B"

dat18 <- readr::read_csv('inst/extdata/fundamental_table2.csv')
dat18 <- readr::read_csv(app_sys('extdata/fundamental_table2.csv'))
items$position3 <- div(
style = 'visibility: hidden;',
reactable::renderReactable({
Expand Down Expand Up @@ -138,9 +138,9 @@ mod_learn_versionA_server <- function(id){

)

truth <- readr::read_csv('inst/extdata/truth.csv')
truth <- readr::read_csv(app_sys('extdata/truth.csv'))
truth$ITE <- with(truth, Y1 - Y0)
imputed <- readr::read_csv('inst/extdata/fundamental_table2.csv')
imputed <- readr::read_csv(app_sys('extdata/fundamental_table2.csv'))
imputed$ITE <- with(imputed, Y1 - Y0)
combined <- cbind(truth[, 1:3], imputed[, 4], truth[, 4], imputed[, 5], truth[, 5], truth[, 6])
combined[combined$hyperShoe == 0, 4] <- NA
Expand Down
4 changes: 2 additions & 2 deletions thinkCausal/R/mod_learn_versionB.R
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ mod_learn_versionB_server <- function(id){
imputedY0 <- "#E6C0F0"
imputedY1 <- "#E6C0F0"

dat18 <- readr::read_csv('inst/extdata/fundamental_table2.csv')
dat18 <- readr::read_csv(app_sys('extdata/fundamental_table2.csv'))
items$position3 <- div(
style = 'visibility: hidden;',
reactable::renderReactable({
Expand Down Expand Up @@ -140,7 +140,7 @@ mod_learn_versionB_server <- function(id){

truth <- readr::read_csv('inst/extdata/truth.csv')
truth$ITE <- with(truth, Y1 - Y0)
imputed <- readr::read_csv('inst/extdata/fundamental_table2.csv')
imputed <- readr::read_csv(app_sys('extdata/fundamental_table2.csv'))
imputed$ITE <- with(imputed, Y1 - Y0)
combined <- cbind(truth[, 1:3], imputed[, 4], truth[, 4], imputed[, 5], truth[, 5], truth[, 6])
combined[combined$hyperShoe == 0, 4] <- NA
Expand Down

0 comments on commit 8269056

Please sign in to comment.