title: How to express this sum concisely in R?
body: <p>I have a simple <code>R</code> beginner's question:</p>
  
  <p>How do I express the sum below most concisely in <code>R</code>?</p>
  
  <pre><code>sum_{i=1}^n a / (a+i)
  </code></pre>
  
  <p>I tried the following, but there must be a better way, without actually calling <code>for</code>:</p>
  
  <pre><code>r&lt;-0
  for(i in 1:n){ r &lt;- r + (a / (a+i)) }
  </code></pre>
  
  <p>Thanks!</p>