I want to change fact wrap label in grey rectangle to R2 (with 2 as exponent/superscript). My code looks like this:
ggplot(data=error, aes(x=Buffer, y=Value, group=Model)) +
theme_bw() +
geom_line(aes(color=Model)) +
geom_point(aes(color=Model)) +
labs(title = bquote('Comparison of MAE, RMSE,' ~R^2),
subtitle = "Buffer areas: 500m, 1000, and 1500m",
y = "Value", x = bquote('Buffer radius (m)')) +
facet_wrap(~ Metric)