I am trying to add an arbitrary facet label to a graph that has been faceted with the facet_grid()following:
p <- qplot(wt, mpg, data = mtcars)
p <- p + facet_grid(. ~ vs, labeller = label_bquote(alpha^a==alpha^b))
This is still great. However, when I add a variable on which I split into an equation on a face label, for example:
p <- qplot(wt, mpg, data = mtcars)
p <- p + facet_grid(. ~ vs, labeller = label_bquote(alpha^a==alpha^b==.(x)))
I get the following error:
Error: unexpected '==' in "p <- p + facet_grid (. ~ Vs, labeller = label_bquote (alpha ^ a == alpha ^ b =="
Can someone help me in this seemingly trivial problem?
source
share