title: Write x̄ (meaning average) in legend and how to prevent linebreak?
body: <p>Good day!</p>
  
  <p>I am not that familiar to R so I'd be glad to get a little help.</p>
  
  <p>Assume I have the following minimal example:</p>
  
  <pre><code>test &lt;- c(10,20,40,80,80)
  avg &lt;- mean(test)
  avg &lt;- format(avg,digits=2)
  
  plot(test, xlab="x", ylab="y", pch = 4)
  legend("topleft", legend= c("Average: ", avg))
  </code></pre>
  
  <p>I'd like to write x̄  instead of "average" - wonder if this is event possible as it's not a regular symbol - merely a combination of two (letter plus overline).</p>
  
  <p>The other thing I'd like to get rid of is the line break after the word "Average (see arrow in graphic below): </p>
  
  <p><img src="https://i.stack.imgur.com/xYzhx.png" alt="Output"></p>