"Squared" superscript in ggplot2 yaxis label in R
<p>I am plotting a multiple line graph with <code>ggplot2</code> and am having trouble labeling the y-axis with mile per second squared. I have tried the command:</p>

<pre><code>ggplot(data.frame, aes(id)) + labs(y = "Acceleration in m/s^2")
</code></pre>

<p>and( after searching Stack Overflow):</p>

<pre><code>ggplot(data.frame, aes(id)) + labs(y = expression ("Acceleration in m/s[2]")
</code></pre>

<p>In both cases, the label does not create superscript, instead looking exactly like "Acceleration m/s^2". How should this superscript command for a ggplot label be constructed?</p>