title: Using an expression in plot text - Printing the value of a variable rather than its name
body: <p>I am trying to get a label to have an exponent in it. Here's the code I have</p>
  
  <pre><code>vall = format(cor(x,y)*cor(x,y),digits=3)
  eq &lt;- expression(paste(R^2," = ",vall,sep=""))
  text(legend.x,legend.y,eq,cex=1,font=2)
  </code></pre>
  
  <p>But the text simply looks like this
  <img src="https://i.stack.imgur.com/f3rWx.png" alt="enter image description here"></p>
  
  <p>How do I get the actual vall to show up (and not the text "vall")</p>