3

I am trying to run the code (end of post) from this blog (world map of where R package is being downloaded from)

Everything is fine, except when I try to execute

wm

I get

> wm
Error in grid.Call.graphics(C_polygon, x$x, x$y, index) : 
  invalid color name 'blackcat'

I am expecting this instead,

enter image description here

How to troubleshoot?

install.packages(devtools)
library(devtools)
install_github("talgalili/installr", username="talgalili")
library(installr)
RStudio_CRAN_data_folder <- download_RStudio_CRAN_data(START = '2013-06-10',
                                                       END = '2013-06-17')
my_RStudio_CRAN_data <- read_RStudio_CRAN_data(RStudio_CRAN_data_folder)
wm <- pkgDNLs_worldmapcolor(pkg_name="timeROC",
                            dataset = my_RStudio_CRAN_data)
wm
5
  • I dont know whats going on with blackcat, but if you look at the code of pkgDNLs_worldmapcolor you can see it is hard-coded. So you can either copy the function and tweak that, or else use an idea from here and do wm$layers[[1]]$aes_params$colour <- "black" . then it should plot
    – user20650
    Commented Jul 8, 2018 at 21:57
  • @user20650 Thank you so much. Adding wm$layers[[1]]$aes_params$colour <- "black" works Commented Jul 8, 2018 at 22:05
  • 1
    you're welcome - Its probably worth asking how/what/why the funky cat name at the github page of installr : github.com/talgalili/installr/issues
    – user20650
    Commented Jul 8, 2018 at 22:08
  • 2
    @user20650 Good idea, just added an issue Commented Jul 8, 2018 at 22:12
  • 1
    good: you can see at github.com/talgalili/installr/commit/… when it was changed
    – user20650
    Commented Jul 8, 2018 at 22:13

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.