title: Error in UseMethod("as.xts") : no applicable method for 'as.xts' applied to an object of class "character"
body: <p>I'm making this code where it takes variable names, assigned to different tickers, and gives back the last 252 period returns for that ticker.  Here's the code I'm using:</p>
  
  <pre><code>comp1.a &lt;- 'EFA'
  comp2.a&lt;- 'MSFT'
  comp3.a &lt;- 'GOOG'
  comp4.a &lt;- 'AMZN'
  comp5.a &lt;- 'VXX'
  comp6.a &lt;- 'M'
  comp7.a &lt;- 'SPY'
  
  
  comp1.b &lt;- noquote(comp1.a)
  comp2.b &lt;- noquote(comp2.a)
  comp3.b &lt;- noquote(comp3.a)
  comp4.b &lt;- noquote(comp4.a)
  comp5.b &lt;- noquote(comp5.a)
  comp6.b &lt;- noquote(comp6.a)
  comp7.b &lt;- noquote(comp7.a)
  
  getSymbols(comp1.a, src='yahoo', from='2006-01-01')
  getSymbols(comp2.a, src='yahoo', from='2006-01-01')
  getSymbols(comp3.a, src='yahoo', from='2006-01-01')
  getSymbols(comp4.a, src='yahoo', from='2006-01-01')
  getSymbols(comp5.a, src='yahoo', from='2006-01-01')
  getSymbols(comp6.a, src='yahoo', from='2006-01-01')
  getSymbols(comp7.a, src='yahoo', from='2006-01-01')
  
  Asset.weekly &lt;- periodReturn(tail(Adj.Close,252),'weekly')
  comp1.weekly &lt;- periodReturn(tail(comp1.b,252),'weekly')
  comp2.weekly &lt;- periodReturn(tail(comp2.b,252),'weekly')
  comp3.weekly &lt;- periodReturn(tail(comp3.b,252),'weekly')
  comp4.weekly &lt;- periodReturn(tail(comp4.b,252),'weekly')
  comp5.weekly &lt;- periodReturn(tail(comp5.b,252),'weekly')
  comp6.weekly &lt;- periodReturn(tail(comp6.b,252),'weekly')
  comp7.weekly &lt;- periodReturn(tail(comp7.b,252),'weekly')
  </code></pre>
  
  <p>You may be wondering why I did the whole noquote thing.  It's because if the class used for the period return's data is a character it doesn't work.</p>
  
  <p>Now when I do this, I get back the title of this post:</p>
  
  <pre><code>Error in try.xts(x) : 
  Error in UseMethod("as.xts") :   no applicable method for 'as.xts' 
  applied to an object of class "noquote"
  </code></pre>
  
  <p>Any idea what I did wrong?  Thanks for your help, time, and effort.</p>