Skip to content

Commit

Permalink
Merge pull request #48 from sl-eeper/master
Browse files Browse the repository at this point in the history
fix error of returning p-value as list-> p-value to character
  • Loading branch information
jinseob2kim authored Oct 20, 2024
2 parents 40d4823 + 99ffb4f commit 89bf189
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions R/forestglm.R
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,8 @@ TableSubgroupMultiGLM <- function(formula, var_subgroups = NULL, var_cov = NULL,
return(out.all)
} else {
out.list <- purrr::map(var_subgroups, ~ TableSubgroupGLM(formula, var_subgroup = ., var_cov = var_cov, data = data, family = family, decimal.estimate = decimal.estimate, decimal.percent = decimal.percent, decimal.pvalue = decimal.pvalue))
out.list <- purrr::map(out.list, ~ .x %>%
dplyr::mutate(`P value` = purrr::map_chr(`P value`, ~ if(is.list(.)) as.character(unlist(.)) else as.character(.))))
if (line) {
out.newline <- out.list %>% purrr::map(~ rbind(NA, .))
return(rbind(out.all, out.newline %>% dplyr::bind_rows()))
Expand Down

0 comments on commit 89bf189

Please sign in to comment.