I have a character expression containing results from statistical tests and I want to parse this expression in a ggplot object. But I want the parsed expression to look identical, irrespective of what the value user might have set for scipen options.
with default scipen = 0 (good)
library(ggplot2)
# plot is just for illustration and has nothing to do with the statistics being displayed
ggplot(mtcars, aes(wt, mpg)) + geom_smooth() + geom_point() +
labs(subtitle = parse(text = "list(~chi['gof']^2~(8)==617.445, ~italic(p)==4.15e-128)"))

with scipen = 999 (undesirable)
library(ggplot2)
options(scipen = 999)
# plot is just for illustration and has nothing to do with the statistics being displayed
ggplot(mtcars, aes(wt, mpg)) + geom_smooth() + geom_point() +
labs(subtitle = parse(text = "list(~chi['gof']^2~(8)==617.445, ~italic(p)==4.15e-128)"))

Without changing options on the user's side, how can I make sure that the parsed expression is always in scientific notation?
