jinseob2kim / jstable

Regression Tables from 'GLM', 'GEE', 'GLMM', 'Cox' and 'survey' Results.
https://jinseob2kim.github.io/jstable/
Apache License 2.0
22 stars 14 forks source link

Error in `dplyr::bind_rows()` when there are three variables for subgroup analysis #47

Open will-gt opened 1 week ago

will-gt commented 1 week ago

Hello, I got the following error when I ran the code below. Could you please tell me how to fix it?

Error

Error in dplyr::bind_rows(): ! Can't combine ..1$P value and ..2$P value . Run rlang::last_trace() to see where the error occurred.

Code library(dplyr) lung %>% mutate( status = as.integer(status == 1), sex = factor(sex), kk = factor(as.integer(pat.karno >= 70)), kk1 = factor(as.integer(pat.karno >= 80)), kk2 = factor(as.integer(pat.karno >= 90)) ) -> lung

TableSubgroupMultiGLM(status ~ sex, var_subgroups = c("kk", "kk1", "kk2"), var_cov = c("kk", "kk1", "kk2"), data = lung, line = TRUE, family = "binomial" )

sl-eeper commented 2 days ago

This error occurred because, in version 1.3.4, there were cases where the p-value was returned as both a list and a character. I have submitted a pull request to fix this issue. Once the request is merged, you can update the jstable package from GitHub. Thank you for your suggestion.

will-gt commented 19 hours ago

@sl-eeper Thank you for your quick response! I appreciate your great contribution.

jinseob2kim commented 7 hours ago

Sorry, Could you try install the latest version via remotes::install_github("jinseob2kim/jstable")

will-gt commented 2 hours ago

@jinseob2kim I have installed the latest version; it works correctly now! Thank you very much for this great package! Also, many thanks to @sl-eeper for pulling the request.