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

Possible built-time bug in upset_themes #192

Open
teunbrand opened this issue Jan 17, 2024 · 0 comments
Open

Possible built-time bug in upset_themes #192

teunbrand opened this issue Jan 17, 2024 · 0 comments
Labels
potential-bug Bug report filled by the user

Comments

@teunbrand
Copy link

Describe the bug

The upset_themes variable is instantiated upon package build instead of package load.
The bug is not that terrible, one just has to rebuild the package with the intended version of ggplot2, but it is hard to pin down what is going on.

Code to reproduce

# install ggplot2 release candidate
# remotes::install_github("tidyverse/ggplot2", ref = remotes::github_pull("5592"))
library(ggplot2)
packageVersion("ggplot2")
#> [1] '3.5.0'
library(ComplexUpset) # install before ggplot2

movies = as.data.frame(ggplot2movies::movies)
genres = colnames(movies)[18:24]
upset(movies, genres, name='genre', width_ratio=0.1)
#> Error in `plot_theme()` at ggplot2/R/plot-build.R:178:3:
#> ! The `legend.text.align` theme element is not defined in the element
#>   hierarchy.

Created on 2024-01-17 with reprex v2.1.0

Expected behavior
One expects this code to just work without the error about the deprecated theme argument. I think it might be a feasible option to make a function that generates the contents of upset_themes and run this function in .onLoad.

Context (required)

ComplexUpset version: 1.3.3

R version details
$platform
[1] "x86_64-w64-mingw32"

$arch
[1] "x86_64"

$os
[1] "mingw32"

$crt
[1] "ucrt"

$system
[1] "x86_64, mingw32"

$status
[1] ""

$major
[1] "4"

$minor
[1] "3.2"

$year
[1] "2023"

$month
[1] "10"

$day
[1] "31"

$`svn rev`
[1] "85441"

$language
[1] "R"

$version.string
[1] "R version 4.3.2 (2023-10-31 ucrt)"

$nickname
[1] "Eye Holes"
R session information
#> ─ Session info ───────────────────────────────────────────────────────────────
#>  setting  value
#>  version  R version 4.3.2 (2023-10-31 ucrt)
#>  os       Windows 11 x64 (build 22631)
#>  system   x86_64, mingw32
#>  ui       RTerm
#>  language (EN)
#>  collate  English_Netherlands.utf8
#>  ctype    English_Netherlands.utf8
#>  tz       Europe/Amsterdam
#>  date     2024-01-17
#>  pandoc   3.1.1 @ C:/Program Files/RStudio/resources/app/bin/quarto/bin/tools/ (via rmarkdown)
#> 
#> ─ Packages ───────────────────────────────────────────────────────────────────
#>  package       * version    date (UTC) lib source
#>  cli             3.6.2      2023-12-11 [1] CRAN (R 4.3.2)
#>  colorspace      2.1-0      2023-01-23 [1] CRAN (R 4.3.2)
#>  ComplexUpset  * 1.3.3      2021-12-11 [1] CRAN (R 4.3.2)
#>  digest          0.6.34     2024-01-11 [1] CRAN (R 4.3.2)
#>  dplyr           1.1.4      2023-11-17 [1] CRAN (R 4.3.2)
#>  evaluate        0.23       2023-11-01 [1] CRAN (R 4.3.2)
#>  fansi           1.0.6      2023-12-08 [1] CRAN (R 4.3.2)
#>  fastmap         1.1.1      2023-02-24 [1] CRAN (R 4.3.2)
#>  fs              1.6.3      2023-07-20 [1] CRAN (R 4.3.2)
#>  generics        0.1.3      2022-07-05 [1] CRAN (R 4.3.2)
#>  ggplot2       * 3.5.0      2024-01-17 [1] local
#>  ggplot2movies   0.0.1      2015-08-25 [1] CRAN (R 4.3.1)
#>  glue            1.7.0      2024-01-09 [1] CRAN (R 4.3.2)
#>  gtable          0.3.4      2023-08-21 [1] CRAN (R 4.3.2)
#>  htmltools       0.5.7      2023-11-03 [1] CRAN (R 4.3.2)
#>  knitr           1.45       2023-10-30 [1] CRAN (R 4.3.2)
#>  labeling        0.4.3      2023-08-29 [1] CRAN (R 4.3.1)
#>  lifecycle       1.0.4      2023-11-07 [1] CRAN (R 4.3.2)
#>  magrittr        2.0.3      2022-03-30 [1] CRAN (R 4.3.2)
#>  munsell         0.5.0      2018-06-12 [1] CRAN (R 4.3.2)
#>  patchwork       1.2.0.9000 2024-01-16 [1] Github (thomasp85/patchwork@d943757)
#>  pillar          1.9.0      2023-03-22 [1] CRAN (R 4.3.2)
#>  pkgconfig       2.0.3      2019-09-22 [1] CRAN (R 4.3.2)
#>  purrr           1.0.2      2023-08-10 [1] CRAN (R 4.3.2)
#>  R.cache         0.16.0     2022-07-21 [1] CRAN (R 4.3.2)
#>  R.methodsS3     1.8.2      2022-06-13 [1] CRAN (R 4.3.1)
#>  R.oo            1.25.0     2022-06-12 [1] CRAN (R 4.3.1)
#>  R.utils         2.12.3     2023-11-18 [1] CRAN (R 4.3.2)
#>  R6              2.5.1      2021-08-19 [1] CRAN (R 4.3.2)
#>  reprex          2.1.0      2024-01-11 [1] CRAN (R 4.3.2)
#>  rlang           1.1.3      2024-01-10 [1] CRAN (R 4.3.2)
#>  rmarkdown       2.25       2023-09-18 [1] CRAN (R 4.3.2)
#>  rstudioapi      0.15.0     2023-07-07 [1] CRAN (R 4.3.2)
#>  scales          1.3.0      2023-11-28 [1] CRAN (R 4.3.2)
#>  sessioninfo     1.2.2      2021-12-06 [1] CRAN (R 4.3.2)
#>  styler          1.10.2     2023-08-29 [1] CRAN (R 4.3.2)
#>  tibble          3.2.1      2023-03-20 [1] CRAN (R 4.3.2)
#>  tidyselect      1.2.0      2022-10-10 [1] CRAN (R 4.3.2)
#>  utf8            1.2.4      2023-10-22 [1] CRAN (R 4.3.2)
#>  vctrs           0.6.5      2023-12-01 [1] CRAN (R 4.3.2)
#>  withr           3.0.0      2024-01-16 [1] CRAN (R 4.3.2)
#>  xfun            0.41       2023-11-01 [1] CRAN (R 4.3.2)
#>  yaml            2.3.8      2023-12-11 [1] CRAN (R 4.3.2)
#> 
#>  [1] C:/Users/Teun/AppData/Local/R/win-library/4.3
#>  [2] C:/Program Files/R/R-4.3.2/library
#> 
#> ──────────────────────────────────────────────────────────────────────────────
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
potential-bug Bug report filled by the user
Projects
None yet
Development

No branches or pull requests

1 participant