-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
Conversation
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 |
There was a problem hiding this 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)), |
There was a problem hiding this comment.
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))
.
There was a problem hiding this comment.
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.
Closes #830