epiverse-trace / epiCo

R package for statistical and spatiotemporal modeling of epidemiological data for vector-borne diseases in Colombia
https://epiverse-trace.github.io/epiCo/
Other
12 stars 1 forks source link

Replace RColorBrewer by base R equivalent #136

Closed Bisaloo closed 3 months ago

Bisaloo commented 4 months ago

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