georgeryang / tidy-tuesday

1 stars 0 forks source link

could not find function "rocket" #1

Open liamxg opened 2 years ago

liamxg commented 2 years ago

tm_shape(afripop2000) +

  • tm_raster(palette = rev(rocket(5)),
  • breaks=c(0,2,20,200,2000,25000),
  • title = "Number of people per square kilometer") +
  • tm_shape(africountries) Error in rocket(5) : could not find function "rocket"
georgeryang commented 2 years ago

I wasn’t able to replicate this error. Can you confirm that you have the viridisLite package loaded?

liamxg commented 2 years ago

yes, loaded.

library(tidyverse) > library(afrilearndata) > library(tmap) > library(magick) Linking to ImageMagick 6.9.10.23 Enabled features: fontconfig, freetype, fftw, lcms, pango, webp, x11 Disabled features: cairo, ghostscript, heic, raw, rsvg Using 16 threads > library(viridisLite) > tm_shape(afripop2000) + + tm_raster(palette = rev(rocket(5)), #palette = rev(rocket(5)) + breaks=c(0,2,20,200,2000,25000), + title = "Number of people per square kilometer") Error in rocket(5) : could not find function "rocket"

 

| >

liamxg commented 2 years ago
image