Rsquared in facet

How can I insert R-squared in my ggplot.My data is here dat
So far, I have done this

df=read_csv("df.csv",col_names = TRUE)
ggplot(df, aes(x =Precip_mm, y =simu_peak , colour = month)) +
  geom_point() +
  facet_wrap( ~ month )+
  xlab("Measured") + ylab("Simulated")+
  geom_smooth(method = "lm", se=FALSE, color="black", formula = y ~ x)

See this post.

1 Like

This topic was automatically closed 21 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.