title: Having trouble fixing error using quantmod package in R : Error in inherits(x, "xts"): object 'M' not found calls
body: <p>below is my code. What I am trying to do is download multiple symbols of stocks and plot charts, but I am getting this error:</p>
  
  <p>Error in inherits(x, "xts"): object 'M' not found calls: ...
  eval-> chartSeries -> try.xts ->is.xts -> inherits </p>
  
  <pre><code>library(quantmod)
  stocks &lt;- c("INFY.NS","HINDALCO.NS","TCS.NS","TATASTEEL.NS","NESTLEIND.NS",
    "TECHM.NS","HCLTECH.NS","HDFCBANK.NS","JETAIRWAYS.NS","BLUEDART.NS",
    "AUROPHARMA.NS","APOLLOHOSP.NS", "IOC.NS", "HINDPETRO.NS","BHEL.NS",
    "NTPC.NS", "HINDZINC.NS", "M&amp;M.NS", "RELIANCE.NS","ONGC.NS", "ORIENTBANK.NS",
    "MARUTI.NS", "ASHOKLEY.NS", "ASIANPAINT.NS", "DABUR.NS", "DRREDDY.NS",
    "BHARTIARTL.NS", "BATAINDIA.NS", "LTI.NS")
  getSymbols(stocks,from="2017-01-01")
  chartSeries(INFY.NS)  
  chartSeries(HINDALCO.NS)
  chartSeries(TCS.NS)
  chartSeries(TATASTEEL.NS)
  chartSeries(NESTLEIND.NS)
  chartSeries(TECHM.NS)
  chartSeries(HCLTECH.NS)
  chartSeries(HDFCBANK.NS)
  chartSeries(JETAIRWAYS.NS)
  chartSeries(BLUEDART.NS)
  chartSeries(AUROPHARMA.NS)
  chartSeries(APOLLOHOSP.NS)
  chartSeries(IOC.NS) 
  chartSeries(HINDPETRO.NS) 
  chartSeries(BHEL.NS) 
  chartSeries(NTPC.NS)
  chartSeries(HINDZINC.NS)
  chartSeries(M&amp;M.NS)
  chartSeries(RELIANCE.NS)
  chartSeries(ONGC.NS)
  chartSeries(ORIENTBANK.NS)
  chartSeries(MARUTI.NS)
  chartSeries(ASHOKLEY.NS)
  chartSeries(ASIANPAINT.NS)
  chartSeries(DABUR.NS)
  chartSeries(DRREDDY.NS)
  chartSeries(BHARTIARTL.NS)
  chartSeries(BATAINDIA.NS)
  chartSeries(LTI.NS)
  </code></pre>