I want to include a partly italic text (*p=*0.x) into my graph using geom_text. I found this solution How do I include italic text in geom_text_repel or geom_text labels for ggplot?
I tried this:
geom_text(parse=TRUE, aes(x=2, y = 104, label=expression(paste(italic("p="),"0.052"))), size=5)
this is the output:
Don't know how to automatically pick scale for object of type expression. Defaulting to continuous.
Error: Column label
must be a 1d atomic vector or a list
I'm quite new in R and ggplot2 and most of time have no idea what I'm doing. Could somebody explain me why this doesn't work?