Skip to content

refactor print.numeric_range() #83

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

Merged
merged 1 commit into from
May 6, 2025
Merged

Conversation

EmilHvitfeldt
Copy link
Member

Came about this and spruced it up a little

@@ -61,28 +61,20 @@ adjust_numeric_range <- function(x, lower_limit = -Inf, upper_limit = Inf) {
#' @export
print.numeric_range <- function(x, ...) {
trn <- ifelse(x$trained, " [trained]", "")
# todo could be na
Copy link
Member Author

Choose a reason for hiding this comment

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

Technically this works as if, since signif(NA) = NA. it will thus show up as NA in the print method.

If we want it to show missing that would't be hard to change

@EmilHvitfeldt EmilHvitfeldt requested a review from topepo May 5, 2025 21:08
Copy link
Member

@topepo topepo left a comment

Choose a reason for hiding this comment

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

💯

@topepo topepo merged commit bc74272 into main May 6, 2025
14 checks passed
@topepo topepo deleted the refactor-print.numeric_range branch May 6, 2025 18:56
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