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

Fix tm_t_coxreg errors when applying filters #831

Merged
merged 5 commits into from
Sep 27, 2023

Conversation

edelarua
Copy link
Contributor

Closes #830

@edelarua edelarua added the sme label Sep 21, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Sep 21, 2023

Unit Tests Summary

    1 files    33 suites   3s ⏱️
149 tests 149 ✔️     0 💤 0
280 runs  168 ✔️ 112 💤 0

Results for commit 64e2513.

♻️ This comment has been updated with latest results.

R/arm_ref_comp.R Outdated Show resolved Hide resolved
@mthbretscher
Copy link

Thanks @edelarua for fixing these two errors so extremely fast! I'm very impressed.. and thanks to @mhallal1 for helping me understand the bugs better before filing. Is there any chance this branch could be merged into main in the coming days? I'm organising a hands-on session with a downstream shiny app on Thursday next week (Oct. 5th).. would be awesome if I could already have the fixes in for that. Don't worry if not possible.

@Melkiades
Copy link
Contributor

Thanks @edelarua for fixing these two errors so extremely fast! I'm very impressed.. and thanks to @mhallal1 for helping me understand the bugs better before filing. Is there any chance this branch could be merged into main in the coming days? I'm organising a hands-on session with a downstream shiny app on Thursday next week (Oct. 5th).. would be awesome if I could already have the fixes in for that. Don't worry if not possible.

PR looks good to me. Could we have another tester for this? @chlebowa @ayogasekaram

Copy link
Contributor

@chlebowa chlebowa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bugs have been fixed niceluy 👌

data_pipe <- add_expr(
data_pipe,
substitute(
expr = dplyr::mutate(across(where(is.factor) & cov_var, droplevels)),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume the across is.factor is because droplevels raises error for characters. If we cannot be sure that cov_var is a factor, fair enough, if it is enforced, however, I would just go with mutate(cov_var = droplevels(cov_var)).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's because of the error for characters but also because cov_var can be a single variable name or a vector of variable names and we want to account for all of these variables.

@edelarua edelarua merged commit 614ee4c into main Sep 27, 2023
23 checks passed
@edelarua edelarua deleted the 830_coxreg_filter_errors@main branch September 27, 2023 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: tm_t_coxreg crashes when using a factor variable as covariate where some levels were removed by filter
4 participants