J'utilise le support plotmath
en ajoutant des annotations à mon intrigue, c'est-à-dire en utilisant l'argument parse=TRUE
. En examinant le plotmath documentation here, il n'est pas clair comment échapper des symboles prédéfinis, par ex. %Comment échapper des symboles prédéfinis, par ex. % avec plotmath?
label <- 'atop(This~goes~on~top,of~this~with~11.1%)' # how to escape the % sign?
geom_text(...,label=label,parse=TRUE)
qui conduit à l'erreur suivante:
Error in parse(text = as.character(lab)) : <text>:1:40: unexpected input
1: atop(This~goes~on~top,of~this~with~11.1%)
^
S'il vous plaît fournir un [ exemple reproductible] (https://stackoverflow.com/q/5963269/980833). –