I'm using the plotmath
support while adding annotations to my plot i.e. using the parse=TRUE
argument. Reviewing the plotmath documentation here it is not clear how to escape predefined symbols e.g. %
label <- 'atop(This~goes~on~top,of~this~with~11.1%)' # how to escape the % sign?
geom_text(...,label=label,parse=TRUE)
which leads to the following error:
Error in parse(text = as.character(lab)) : <text>:1:40: unexpected input
1: atop(This~goes~on~top,of~this~with~11.1%)
^
Just put it in quotes
Just put all test in quotes