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
Implement geom_parallel_slopes()
#55
Implement geom_parallel_slopes()
#55
Conversation
…e they are both redundant and currently have issues with different random generation algorithm.
I updated '.travis.yml' to not run {vdiffr} tests on old release. They are both redundant and currently have issues with different random generation algorithm. This is currently a problem because I set up tests for |
Codecov Report
@@ Coverage Diff @@
## master #55 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 3 4 +1
Lines 148 186 +38
=====================================
+ Hits 148 186 +38
|
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.
Also, please add your name as package ctb
and preferred contact method to DESCRIPTION
include: | ||
- r: oldrel | ||
# Don't use vdiffr on old R release | ||
env: VDIFFR_RUN_TESTS=false |
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.
interesting
R/geom_parallel_slopes.R
Outdated
#' output(s) to a \code{ggplot} object. Basically, it fits a unified model with | ||
#' intercepts varying between groups (which should be supplied as standard | ||
#' {ggplot2} grouping aesthetics: \code{group}, \code{color}, \code{fill}, | ||
#' etc.). |
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.
Could you add a comment that this geom provides functionality that geom_smooth()
doesn't?
#' ggplot_viz <- ggplot2::ggplot( | ||
#' example_df, | ||
#' ggplot2::aes(x = log10_size, y = log10_price, color = condition) | ||
#' ) + |
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 we merge we'll likely polish these a bit to make them more in line with the coding style we've been presenting to students in our intro courses. For example, we don't use dplyr::
but rather load the libraries
Thanks a bunch! This really great work! Also, I just learned a lot about unit testing in this PR! |
I am really glad this PR was and will be useful. Thank you for a challenging task 👍 |
Thank you for doing it on such short notice! Everyone I've shown this to is already excited! |
This PR implements a {ggplot2} layer function for fitting and plotting parallel slopes model. It is as similar to
geom_smooth()
as reasonably possible. It also has the ability to fit non-linear models (as shown in examples).Closes #26.