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

Pull Request by Zilin Huang regarding Issue #222 #229

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

huangz73
Copy link

Fixed issue #222 by updating the error message.

@huangz73
Copy link
Author

ggcuminc.R has an updated error message.

Comment on lines +58 to +65
# Generate an error if the input is a `survfit.coxphms` regression model: ----
if (inherits(x, "survfitcoxms")) {
cli_abort(
"Argument {.arg x} does not support {.cls survfit.coxphms} object.
Please fit a multi-state model with another project, such as {.fn coxph}."
)
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please use the simplified text we discussed here.

R/ggcuminc.R Outdated
@@ -69,8 +77,9 @@ ggcuminc <- function(x, outcome = NULL,
cli_inform("Plotting outcome {.val {outcome}}.")
}
if (any(!outcome %in% unique(df$outcome))) {
cli_abort("Argument {.code outcome} must be one or more of {.val {unique(df$outcome)}}")
cli_abort("Argument {.arg x} does not support {.cls survfit.coxphms} object.")
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't understand this change to the error message. Was this intentional?

@@ -34,6 +34,8 @@
#' # specify additional scales
#' ggsurvfit +
#' scale_ggsurvfit(x_scales = list(breaks = seq(0, 8, by = 2)))
#'

Copy link
Collaborator

Choose a reason for hiding this comment

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

was this spacing addition intentional/needed? if not, can you please revert

Copy link
Author

Choose a reason for hiding this comment

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

@ddsjoberg I have reverted it back (probably add this space by accident). Thanks for reminding.

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

Successfully merging this pull request may close these issues.

2 participants