We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If you want to specify factor level order it is ignored in tbl_survfit() . Example below
tbl_survfit()
library(gtsummary) library(survival) # make 0 drug b and first factor level trial <- mutate(trial, trt = ifelse(trt == "Drug A",1,0), trt = factor(trt, levels = c(0,1),labels = c("Drug B", "Drug A"))) mod1 <- survfit(Surv(ttdeath, death)~trt,trial) mod2 <- coxph(Surv(ttdeath, death)~trt, trial) # tbl_survfit still puts drug a first tbl_survfit(mod1, times = 12, sort = c("Drug B", "Drug A")) # factor level respected in cox model/ tbl_regression tbl_regression(mod2)
The text was updated successfully, but these errors were encountered:
#764 fct order bug fix in survfit
f6c760c
#764 fct order bug fix in survfit (#765)
3be7eb1
* #764 fct order bug fix in survfit * Update test-tbl_survfit.R * Update add_global_p.R * updated news and bumped version number Co-authored-by: michaelcurry1123 <30420015+michaelcurry1123@users.noreply.github.com> Co-authored-by: Curry <currym1@mskcc.org>
Successfully merging a pull request may close this issue.
If you want to specify factor level order it is ignored in
tbl_survfit()
. Example belowThe text was updated successfully, but these errors were encountered: