I want to add "R^2 = 70%" to my plot using geom_text() (where ^ indicates a superscript).
Without the % sign, it's easy:
my.data <- data.frame(x=1:5, y=1:5)
p1 <- ggplot(my.data, aes(x=x, y=y)) + geom_point()
p1 <- p1 + geom_text(x=2.5, y=5, label="R^2 == 70", parse=TRUE)
p1
Adding % is trickier than expected. I managed to get it by adding a second geom_text() statement:
p1 <- p1 + geom_text(x=2.63, y=4.97, label="%")
p1
How can it be done with a single geom_text() statement?