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?