diff --git a/DESCRIPTION b/DESCRIPTION index 715b97a1a..35980d0a5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -106,7 +106,7 @@ Config/Needs/verdepcheck: haleyjeppson/ggmosaic, tidyverse/ggplot2, tidyverse/rvest, htmlwidgets/sparkline, rstudio/shinytest2, r-lib/testthat, r-lib/withr Config/Needs/website: insightsengineering/nesttemplate -Config/roxygen2/version: 8.0.0 +Config/roxygen2/version: 8.1.0 Encoding: UTF-8 Language: en-US Roxygen: list(markdown = TRUE, packages = c("roxy.shinylive")) diff --git a/NEWS.md b/NEWS.md index 1f6a4fdb9..256485dc1 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,9 @@ # teal.modules.general 0.8.0.9000 +### Bug fixes + +- Fixed `tm_missing_data` failing with `dplyr (>= 1.1.0)` when grouping by subject, which raised a "must be size 1" error (#1013). + # teal.modules.general 0.8.0 ### Enhancements diff --git a/R/tm_missing_data.R b/R/tm_missing_data.R index c175d073e..fbc96493c 100644 --- a/R/tm_missing_data.R +++ b/R/tm_missing_data.R @@ -1322,7 +1322,7 @@ srv_missing_data <- function(id, # order columns by decreasing percent of missing values ordered_columns <- summary_plot_patients %>% dplyr::select(-"id", -dplyr::all_of(parent_keys)) %>% - dplyr::summarise( + dplyr::reframe( column = create_cols_labels(colnames(.)), na_count = apply(., MARGIN = 2, FUN = sum), na_percent = na_count / nrow(.) * 100