-
Notifications
You must be signed in to change notification settings - Fork 0
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 group_level when printing a character of a number #25
Conversation
…reviously, these values would be overwritten with empty quotes. Its unclear why this design choice was chosen
After further inspection, I realized that code I removed was meant to handle no |
The plots show "10.00". Probably just a typo in the PR description, but to make sure: was the character "10" or "10.00"? |
tests/testthat/test-base-plot.R
Outdated
df <- df %>% mutate(group_level = as.character(group_level)) | ||
|
||
plt2 <- plot_forest(df) | ||
vdiffr::expect_doppelganger("Chacter interpretation of numeric group_level", plt2) |
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.
typo: chacter
Correct, the specified character was "10.00", I just abbreviated it |
Would you mind expanding it in the description? Abbreviating invites confusion in this case. |
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.
After further inspection, I realized that code I removed was meant to handle no group_level being specified. By removing that code, we now get labels when none is supplied (which is not ideal). To fix this, I modified the section below:
Thanks for the analysis. I'm largely taking it at face value given I'm not familiar with this codebase, but that makes sense from what I can tell.
Reviewing this I've
- confirmed that the case reported in
group_level
not printing when character of a number #24 is resolved - confirmed that the new test fails if you revert the code changes from this PR
From my view, this is good to go once the _snaps/
files are refreshed:
#25 (comment)
@kyleam I noticed I was getting warnings about Warning (test-nsim-plot.R:23): Multiple simulations: Multiple simulations base test [PMF-PLOT-012]
Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
ℹ Please use `linewidth` instead. Taken from their latest release:
It seems this change was introduced in their latest release, and they plan on supporting the old method of size for a while. pmplots might be affected by this change as well, but im wondering when we should incorporate this change, given that we want to support older MPN snapshots, while being sure to make this change before ggplot stops supporting it. If they were to install this package via |
This PR removes a section that prevented numeric
group_levels
from being used.Previously, these values would be overwritten with empty quotes:
Its unclear why this design choice was chosen. I imagine it was to prevent numeric levels from being passed though, though I dont see why that would be cause for concern.
EDIT: After further inspection, I realized that code I removed was meant to handle no
group_level
being specified. By removing that code, we now get labels when none is supplied (which is not ideal). To fix this, I modified the section below:Moving forward, both character interpretations of numeric columns, and actual numeric columns can be used:
Character of
![image](https://user-images.githubusercontent.com/18685116/201721278-817796a9-0a6c-40f9-a571-d23c404c3cfb.png)
'10.00'
Value of
![image](https://user-images.githubusercontent.com/18685116/201721317-f91850b4-2eef-4bf4-9697-9c6a409cd696.png)
10
closes #24