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

Replace RColorBrewer by base R equivalent #136

Merged
merged 2 commits into from
Jul 29, 2024
Merged

Conversation

Bisaloo
Copy link
Member

@Bisaloo Bisaloo commented Jul 3, 2024

This also adds a dependency on R 4.0.0 but it is in line with our and the tidyverse's policy on R version dependencies.

R 4.0.0 was released in April 2020 and users with outdated version will have to upgrade to use tidyverse package updates anyways.

Proof of the equivalence:

RColorBrewer::brewer.pal(n = 12, name = "Set3")
#>  [1] "#8DD3C7" "#FFFFB3" "#BEBADA" "#FB8072" "#80B1D3" "#FDB462" "#B3DE69"
#>  [8] "#FCCDE5" "#D9D9D9" "#BC80BD" "#CCEBC5" "#FFED6F"
grDevices::palette.colors(n = 12, palette = "Set3")
#>  [1] "#8DD3C7" "#FFFFB3" "#BEBADA" "#FB8072" "#80B1D3" "#FDB462" "#B3DE69"
#>  [8] "#FCCDE5" "#D9D9D9" "#BC80BD" "#CCEBC5" "#FFED6F"

Created on 2024-07-03 with reprex v2.1.0

This is not strictly necessary as grDevices is a base package but it is still generally seen as better practice
@Juanmontenegro99 Juanmontenegro99 merged commit d63a3b4 into main Jul 29, 2024
9 checks passed
@Juanmontenegro99 Juanmontenegro99 deleted the rm-colorbrewer branch July 29, 2024 16:15
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.

None yet

2 participants