title: How to display greek letter in R plot when the letter is supplied as a string
body: <p>I want to display Greek letters in R plot, where the letters are data frame names. For example, assume I have </p>
  
  <pre><code>dataframe &lt;- read.table("input.dat");
  cnames &lt;- colnames(dataframe);
  # asssume cnames[1] = "alpha[1]" cnames[2] = "alpha[2]"
  </code></pre>
  
  <p>I want to plot alpha[1] ~ alpha[2] with alpha being displayed as greek letter instead of strings i.e sth. like</p>
  
  <pre><code>plot(as.formula(paste(cnames[1],"~",cnames[2])), xlab=expression(cnames[1]) ......)
  </code></pre>
  
  <p>However, this doesn't work and I cannot google a solution. Does anyone know how to do that? This example seems trivial but in my real dataset, I have many columns and I need to plot some randomly chosen variables.</p>
  
  <p>Many thanks</p>