0

In ggplot, I am trying to plot a continuous variable "CPUE" against "Year" and assigning different colors according to a categorical variable "Gear".

ggplot(data=datAn, aes(Year, CPUE, color=Gear))+geom_point()

I have suddenly been getting the following error message:

Error in discrete_colours(colours):could not find function "discrete_colours"

Not sure this is relevant but, when loading the library, I get the following:

Attaching package: ‘ggplot2’
The following objects are masked _by_ ‘.GlobalEnv’:
scale_colour_continuous, scale_colour_discrete, scale_colour_gradient, scale_fill_continuous,
scale_fill_discrete, scale_fill_gradient

Can somebody help?

Roman
  • 17,008
  • 3
  • 36
  • 49
  • This means that the ggplot2 package doesn't include this function. – Roman Oct 20 '17 at 09:54
  • But it used to work fine. Is there a way I can "reset" ggplot2. I tried uninstalling/reinstalling the package but it doesn't help. – Caroline Oct 20 '17 at 10:22

0 Answers0