-
Notifications
You must be signed in to change notification settings - Fork 164
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
addresses #578 - use dplyr::select insstead of select_ #579
Conversation
sorry, this is the same person that opened the issue here, just on a different account. I don't mean to confuse. I was having trouble with that account |
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.
Thank you so much for this merge request and the added unit tests, highly appreciated. Just 2 minor comments. Would you have time to adress them, so that we can merge?
R/ggsurvplot_combine.R
Outdated
dplyr::select(strata, time, n.risk, pct.risk, n.event, cum.n.event, | ||
n.censor, cum.n.censor, strata_size) |
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.
To avoid R cmd check warning, quotes are needed around variables. The code should look like this:
dplyr::select( dplyr::all_of(c("strata", "time", "n.risk", "pct.risk",
"n.event", "cum.n.event", "n.censor",
"cum.n.censor", "strata_size")))
R/surv_median.R
Outdated
@@ -59,7 +59,7 @@ surv_median <- function(fit, combine = FALSE){ | |||
.table$strata <- rownames(.table) | |||
|
|||
.table <- .table %>% | |||
dplyr::select_(.dots = c("strata", "median", "`0.95LCL`", "`0.95UCL`")) | |||
dplyr::select(strata, median, `0.95LCL`, `0.95UCL`) |
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.
As above (to avoid R check warnings), the code should be:
dplyr::select(dplyr::all_of(c("strata", "median", "0.95LCL", "0.95UCL")))
also related to #460 , #577, #509, and #546
there are two ways to fix this select warning
!!!syms
in front of the vector like Fix for dplyr 1.0.0 #460I chose 1 because I think it's simpler
I also added a test