I am working on a plot in which I have scaled the horizontal axis by a factor of ten thousand. I've been trying to include that in my axis label, but have consistently failed. However, what I've found is that this works:
g <- g + xlab(expression(paste("Word Count ", (x %.% 10^4))))
but this does not:
g <- g + xlab(expression(paste("Word Count ", (%.% 10^4))))
The latter throws the error "Unexpected special in...".
Were I to be writing the label I wanted in LaTeX, it would be: $\text{Word Count } \left( \cdot 10^4 \right)$.
How do I get the axis label I'm after without the extra character?
For whatever reason,
expression
needs something on the left-hand side. However, that something can beNULL
, so this works: