Error Message in my code

I have been trying to do a simple mapping code for a final project in my class. It worked and knitted fine then the next day I received this error message

'decode_colour' is not an exported object from 'namespace:farver

I can't figure out what to do, even making a simple ggplot graph I get the same message.

Here is my code that I am using and getting the message

library(tidyverse)
library(maps)
library(ggplot2)
library(dplyr)

ggplot(usa) +
geom_polygon(aes(x = long, y = lat, group = group),
color = "black", fill = "green") +
geom_point(data = Data, aes(x = Longitude, y = Latitude, group = School),
color = "red", fill = "blue")

Where is the usa object coming from? That's the error I run into if I run your code as-is (note, since you've already run library(tidyverse) you don't need to attach dplyr and ggplot2)

library(tidyverse)
library(maps)
#> 
#> Attaching package: 'maps'
#> The following object is masked from 'package:purrr':
#> 
#>     map

ggplot(usa) +
  geom_polygon(aes(x = long, y = lat, group = group),
    color = "black", fill = "green"
  ) +
  geom_point(
    data = Data, aes(x = Longitude, y = Latitude, group = School),
    color = "red", fill = "blue"
  )
#> Error in ggplot(usa): object 'usa' not found

Created on 2019-12-02 by the reprex package (v0.3.0.9001)

Hi,

I have started to receive the same error message a couple of days ago:
Fehler: 'decode_colour' ist kein von 'namespace:farver' exportiertes Objekt

I have received it in two different projects, always when using ggplot().
Since I have now observed it in a code that has worked just recently, I suspect that something with new package versions is the problem.

Maybe somebody has an idea what is the cause of this new error?

I've seen this in various places recently. A workaround I found was packagename:::function() i.e. farver:::decode_colour. Best of luck.

Which version of farver is being used? I have 1.1.0 and it does not list decode_colour as a function but the documentation for the latest version, 2.0.1 released 2019-11-13, does list that function.

Then re-installing 1.1.0 should be the solution?

No, I would expect that using farver 2.0.1 would fix the problem because decode_colour is listed as a function in that version. I would also try the solution proposed by SimonDedman.

If, for some reason, neither of these works, you might consider filing an issue in the ggplot2 GitHub repo. Though, from the look of this issue, it might be a better fit for the farver repo: