Closed nanxstats closed 5 months ago
Using ggsci 3.0.2 (the version that removes scale_name argument) with ggplot2 < 3.5.0, it will complain:
scale_name
Error in `discrete_scale()`: ! argument "scale_name" is missing, with no default Backtrace: 1. ggsci::scale_color_npg() 2. ggplot2::discrete_scale(...) 3. ggplot2::ggproto(...) 4. rlang::list2(...) Execution halted
There are two options:
We could declare the minimum version ggplot2 (>= 3.5.0) in DESCRIPTION, As suggested by https://github.com/nanxstats/ggsci/issues/25#issuecomment-2014550991, although that would require users to upgrade ggplot2.
ggplot2 (>= 3.5.0)
DESCRIPTION
Determine the ggplot2 version live and then branch off, to keep it backward compatible. This seem related: shiny:::is_installed().
shiny:::is_installed()
Using ggsci 3.0.2 (the version that removes
scale_name
argument) with ggplot2 < 3.5.0, it will complain:There are two options:
We could declare the minimum version
ggplot2 (>= 3.5.0)
inDESCRIPTION
, As suggested by https://github.com/nanxstats/ggsci/issues/25#issuecomment-2014550991, although that would require users to upgrade ggplot2.Determine the ggplot2 version live and then branch off, to keep it backward compatible. This seem related:
shiny:::is_installed()
.