In R, I have a dataframe like this:
and the following function:
doMatchPlotError<-function(errorCalculated,title){
errorCalculated[,1]<-as.yearmon(errorCalculated[,1])
plot<-ggplot(data = errorCalculated,aes(x=dates,y=error,group=name,colour=name,linetype=variante))+
geom_line()+
scale_x_yearmon()+
ylab("Error")+
ggtitle(title)
plot
}
but, when I execute the code, i get this error:
Error: geom_path: If you are using dotted or dashed lines, colour, size and linetype must be constant over the line
can someone please tell my where is the error?