Skip to content
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

Get rid of warnings and clean lints #267

Merged
merged 28 commits into from
Feb 28, 2023
Merged

Get rid of warnings and clean lints #267

merged 28 commits into from
Feb 28, 2023

Conversation

@codecov-commenter
Copy link

codecov-commenter commented Jan 27, 2023

Codecov Report

Merging #267 (d23ef23) into main (e9f8f94) will decrease coverage by 0.16%.
The diff coverage is 45.63%.

❗ Current head d23ef23 differs from pull request most recent head eef61d3. Consider uploading reports for the commit eef61d3 to get more accurate results

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main     #267      +/-   ##
==========================================
- Coverage   44.65%   44.50%   -0.16%     
==========================================
  Files          65       65              
  Lines        4344     4476     +132     
==========================================
+ Hits         1940     1992      +52     
- Misses       2404     2484      +80     
Impacted Files Coverage Δ
R/coord_radar.R 100.00% <ø> (ø)
R/data_plot.R 92.85% <ø> (ø)
R/plot.compare_parameters.R 0.00% <0.00%> (ø)
R/plot.equivalence_test.R 0.00% <0.00%> (ø)
R/plot.parameters_brms_meta.R 0.00% <0.00%> (ø)
R/plot.parameters_sem.R 0.00% <0.00%> (ø)
R/plot.parameters_simulate.R 0.00% <0.00%> (ø)
R/plot.si.R 43.83% <ø> (ø)
R/theme_radar.R 51.85% <ø> (ø)
R/utils_add_prior_layer.R 0.00% <0.00%> (ø)
... and 23 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@IndrajeetPatil

This comment was marked as outdated.

@IndrajeetPatil IndrajeetPatil changed the title Get rid of warnings about aes_string Get rid of warnings and clean lints Jan 29, 2023
@IndrajeetPatil

This comment was marked as resolved.

@strengejacke
Copy link
Member

sorry, wasn't meaning to close this. But issue should be fixed with current dev of correlation.

@IndrajeetPatil
Copy link
Member Author

Awesome! Thanks a lot, @strengejacke!

@strengejacke
Copy link
Member

There's one issue which I'm not sure how to address:

library(see)
library(parameters)

model <- lm(Sepal.Length ~ Species, data = iris)
plot(p_function(model))
#> Warning: Using linewidth for a discrete variable is not advised.

I thought linewidth aes can also be assigned to groups, and width can be scales using scale_*()?

The code in plot.see_p_function():

    # lines for vertical CI bars
    ggplot2::geom_segment(
      data = data_ci_segments,
      mapping = ggplot2::aes(
        x = .data$CI_low,
        y = 1 - .data$CI,
        xend = .data$CI_high,
        yend = 1 - .data$CI,
        group = .data$Parameter,
        linewidth = .data$group
      ),
      colour = colors[1],
      alpha = line_alpha,
      show.legend = FALSE
    )

@bwiernik
Copy link
Contributor

bwiernik commented Feb 18, 2023

@strengejacke that's a generic warning when a continuous aesthetic is applied to a discrete variable. Adding scale_linewidth_ordinal() manually should stop it

(As should making the group variable ordered I think)

@bwiernik
Copy link
Contributor

It might also be better to do a _manual scale and specify the widths

@IndrajeetPatil
Copy link
Member Author

@strengejacke I wanted to get rid of all warnings in this PR, but that's going to take too long and I don't want to keep this PR pending forever. So you can review this one now, and I will create a follow-up PR to clean up remaining lints and warnings. Thanks.

@strengejacke
Copy link
Member

Thanks! There's only one thing I've spotted where I'm not sure if changes are needed.

@IndrajeetPatil IndrajeetPatil merged commit b6f8784 into main Feb 28, 2023
@IndrajeetPatil IndrajeetPatil deleted the ggplot2_warnings branch February 28, 2023 08:38
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.

4 participants