-
Notifications
You must be signed in to change notification settings - Fork 43
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
ggcompare:Implement layer-level P value correction. #143
Comments
Hi Hao, that looks very cool. I am a bit confused about the code in your README, where do you define the logic of e.g. Best, |
I did not explicitly provide the source code for StatCompare and GeomBracket in ggcompare because, in my view, these are just two ggproto objects. According to my usual coding habits, I load them as LazyData, directly copying them from my personal toolkit. Another reason is that my English proficiency is not high, and my source code contains a large number of non-English comments, so I did not copy the source code of StatCompare over. You can view the source code of the corresponding components in R using the following method: StatCompare$compute_layer
StatCompare$compute_panel |
Thanks for the explanation.
Well, it is a bit worrying to load some random binary files from the internet, as those could do anything to my computer. I don't want to suggest that you are doing anything problematic; it's just not good practice and will stop some people from installing your package (for more details see rdaradar post by Bob Rudis).
I can totally empathize with the feeling that it is scary for other people to look at your code. However, I would like to encourage you to make the code easily viewable before installation. This will help anybody (for example me :) ) who wants to learn how you managed to do the p-value adjustment across facets. |
Thank you for your suggestion. Now you can see the specific implementation process here. |
That's great :) And congrats on the nice code. It is quite readable (even without comments) and your approach to do the calculation in Two small things I notice skimming your code:
|
I did not notice the situation you mentioned in the documentation for
Yes, this is a format supported only in newer versions of R, but at least for now, I do not plan to modify it unless there are users who must use an older version of R. |
I found that
ggsignif
has never perfectly resolved the issue of P-value adjustment across panels, andggpubr::stat_compare_means
also has this problem. At the same time, both have deficiencies in adapting to faceting.To address this, I created ggcompare to fill the gaps in P-value adjustment and adaptability to faceting in both. Its primary function is to focus on mean difference testing.
Due to the different operational logic with
ggproto
objects, I chose not to submit a PR to optimize on the basis ofggsignif
, but rather to refactor. However, my main inspiration still comes fromggsignif
.The text was updated successfully, but these errors were encountered: