Why is my code using the "Paletteer" package generating an error?

19 views Asked by At
# Create a color palette
install.packages("paletteer")
install.packages("ggplot2")
library(paletteer)

nColor <- 20
colors <- paletteer_c_viridis(package = "inferno", n = nColor)

ERROR: Error in paletteer_c_viridis(inferno, nColor) : could not find function "paletteer_c_viridis"`

Running this simple code from R-graph-gallery but does not seem to load the package correctly.

Reinstall did not help resolve the error. Is there a dependency I am not aware of?

0

There are 0 answers