Repository navigation
Fix docs (especially for coxph) and UI messaging - #261
Conversation
| rel <- format(rel, big.mark = ",", scientific = FALSE) | ||
| if (length(rel) == 1) { | ||
| if (rel <= 0) { | ||
| if (isTRUE(all.equal(old, new))) { |
There was a problem hiding this comment.
Floating point math scares me. 😱 Any better options for this?
| assess_object(small, small) | ||
| assess_object(small, big) | ||
| }, | ||
| transform = function(x) gsub(obj_size_diff, "<redacted>", x, fixed = TRUE) |
There was a problem hiding this comment.
I'm not sure if it's possible that the memory for these objects would be different in the future or on a different platform, but let's just be safe.
There was a problem hiding this comment.
Yup, I think that's a good idea.👍
simonpcouch
left a comment
There was a problem hiding this comment.
The tests are wonderfully concise and I'm appreciating the way you've phrased these docs. Thumbs up from me. :)
| assess_object(small, small) | ||
| assess_object(small, big) | ||
| }, | ||
| transform = function(x) gsub(obj_size_diff, "<redacted>", x, fixed = TRUE) |
There was a problem hiding this comment.
Yup, I think that's a good idea.👍
| cli::cli_alert_danger("Could not add {.cls {class_name}} class") | ||
| abs_mem <- format(abs(mem), big.mark = ",", scientific = FALSE) | ||
| if (mem < 0) { | ||
| cli::cli_alert_danger("The butchered object is {.val {abs_mem}} larger than the original. Do not butcher.") |
There was a problem hiding this comment.
With this PR, I see:
> res_via_func <- coxph_formula_butchered(example_data)
✖ The butchered object is "920 B" larger than the original. Do not butcher.
(with the blue formatting for 920 B). The quotes caught my eye--perhaps we could use .field or a straight up glue substitution here?
There was a problem hiding this comment.
Oh, I see that Memory released: "533.24 kB" uses this pattern too. Maybe this is fine!
There was a problem hiding this comment.
Something about the phrasing this message feels strange to me but maybe that's the purpose—raise an eyebrow in this weird (maybe coxph-specific?) situation.
There was a problem hiding this comment.
I agree with you that the BLUE plus QUOTES looks weird. What if I change them both to just .field? That makes them green with no quote marks.
|
This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue. |
Closes #260
This PR mainly
coxphdocs about not using butcher from anywhere but the global envTurns out we didn't have
markdown = TRUEset yet so this PR makes that change and updates the needed docs as well.