title: Changing symbol in quantmod code
body: <p>I have the following code that creates a stock chart using data from Yahoo using the R package quantmod.  The symbol retrieved in the code is "KR" in my example.</p>
  
  <p>How can I change the code so that I can retrieve other stock symbols without having to replace each incidence of "KR" with the new stock symbol?</p>
  
  <pre><code>library(quantmod) 
  library(TTR)
  
  
  getSymbols("KR",  src="yahoo")
  KR &lt;- adjustOHLC(KR, use.Adjusted=TRUE)
  
  KR.EMA.9&lt;- EMA(KR$KR.Close, n=5) 
  KR.EMA.34&lt;- EMA(KR$KR.Close, n=50) 
  KR.EMA.200 &lt;- EMA(KR$KR.Close, n=200)
  
  
  candleChart(KR, theme="white", 
              subset='2015-09::2015-10')
              addTA(KR.EMA.9, on=1, col = "red")
              addTA(KR.EMA.34, on=1, col = "blue")
              addTA(KR.EMA.9 - KR.EMA.34,col='blue', type='h',legend="9-34 MA")
  </code></pre>