title: Vectorize() vs apply()
body: <p>The <code>Vectorize()</code> and the <code>apply()</code> functions in <code>R</code> can often be used to accomplish the same goal.  I usually prefer vectorizing a function for readability reasons, because the main calling function is related to the task at hand while <code>sapply</code> is not.  It is also useful to <code>Vectorize()</code> when I am going to be using that vectorized function multiple times in my R code.  For instance:</p>
  
  <pre><code>a &lt;- 100
  b &lt;- 200
  c &lt;- 300
  varnames &lt;- c('a', 'b', 'c')
  
  getv &lt;- Vectorize(get)
  getv(varnames)
  </code></pre>
  
  <p>vs</p>
  
  <pre><code>sapply(varnames, get)
  </code></pre>
  
  <p>However, at least on SO I rarely see examples with <code>Vectorize()</code> in the solution, only <code>apply()</code> (or one of it's siblings).  Are there any efficiency issues or other legitimate concerns with <code>Vectorize()</code> that make <code>apply()</code> a better option?</p>