Warning: Duplicated aesthetics after name standardisation: colour `geom_smooth()` using formula 'y ~ x'

...Good day, may I know where did this error come from?
Warning: Duplicated aesthetics after name standardisation: colour
geom_smooth() using formula 'y ~ x'

and how should I add the r and p-value rather than it comes out italic(P)... when plotting the correlation graph?

Below is my code:
output$correlationGraph <- renderPlotly({

ggscatter(data = datatable,x='Daily New Cases', y ='Daily Deaths', 
          color = "red",
          add = "reg.line",
          smooth = TRUE,
          conf.int = TRUE,
          cor.coef = TRUE,
          cor.method = "pearson",
          xlab = "Daily New Cases",
          ylab = "Daily Deaths",
          add.params = list(color = "blue",
                            fill = "lightgray")
          ) #for the line

})

I need to change this output
image
into this
image

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.