You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In 1.4.0, if all values are missing for a given column, instead of not producing a p-value, adding a p-value with add_p() returns an unhelpful error message:
library(tidyverse)
mtcars %>%
mutate(error_var=NA) %>%
gtsummary::tbl_summary(by="cyl") %>%
gtsummary::add_p()
#> Error: Problem with `mutate()` input `test_name`.#> x Result 11 must be a single string, not NULL of length 0#> ℹ Input `test_name` is `map_chr(.data$test_info, ~pluck(.x, "test_name"))`.
I've added a fix to the dev version. If you'd like to continue using the CRAN release, you'll just need to assign a test to the variable with all missing variables. The issue arose when the missing column was not assigned a default test.
In 1.4.0, if all values are missing for a given column, instead of not producing a p-value, adding a p-value with add_p() returns an unhelpful error message:
Created on 2021-05-04 by the reprex package (v0.3.0)
Previous versions of gtsummary would give a warning message around the impossibility of creating a p-value.
The text was updated successfully, but these errors were encountered: