Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
zheng-gt opened this issue Oct 12, 2024 · 4 comments

Comments

@zheng-gt
Copy link

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
Copy link
Contributor

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.

@zheng-gt
Copy link
Author

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

@jinseob2kim
Copy link
Owner

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

@zheng-gt
Copy link
Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants