From 7e9484e76679f0fc6fedcc69a4c802ac8f8d1a4e Mon Sep 17 00:00:00 2001 From: bcjaeger Date: Fri, 9 Feb 2024 17:14:46 -0500 Subject: [PATCH] drop commented browsers, protect from old version of data.table --- R/nhanes_design_summarize.R | 2 -- R/nhanes_design_viz.R | 2 -- R/nhanes_summarize.R | 2 +- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/R/nhanes_design_summarize.R b/R/nhanes_design_summarize.R index 6aacb49..8af315a 100644 --- a/R/nhanes_design_summarize.R +++ b/R/nhanes_design_summarize.R @@ -72,8 +72,6 @@ nhanes_design_summarize <- function(x, use_statby <- !is.null(x$by_variables) - # browser() - smry_output <- purrr::map_dfr( .x = x$stats[x$stats %in% outcome_stats], diff --git a/R/nhanes_design_viz.R b/R/nhanes_design_viz.R index 11eefd1..deb802e 100644 --- a/R/nhanes_design_viz.R +++ b/R/nhanes_design_viz.R @@ -141,8 +141,6 @@ nhanes_design_viz <- function(x, } - # browser() - if(!group_used){ group <- 'fake_._group' data[[group]] <- 1 diff --git a/R/nhanes_summarize.R b/R/nhanes_summarize.R index 9d3d6d1..a5f1091 100644 --- a/R/nhanes_summarize.R +++ b/R/nhanes_summarize.R @@ -78,7 +78,7 @@ nhanes_summarize <- function(data, if('module' %in% names(dt_key)){ - type_subpop <- dt_key[variable == outcome_variable, module] + type_subpop <- dt_key$module[dt_key$variable == outcome_variable] colname_subpop <- paste('svy_subpop', type_subpop, sep = '_') if(colname_subpop %in% names(dt_data)){