title: How to get an average of words from a list?
body: <p>How do I calculate the average number of words in a list using for loop in <a href="/questions/tagged/r" class="post-tag" title="show questions tagged &#39;r&#39;" rel="tag">r</a>? I have a list called <code>mylist</code> which contains 25 vectors with character quotes on each vector.</p>
  
  <p>Here is my code so far:</p>
  
  <pre><code>count &lt;- 0
  for (i in mylist[1:25]){
  count &lt;- count + i
  mean(count)
  }
  </code></pre>
  
  <p>But I get this error :</p>
  
  <blockquote>
    <p>Error in count + i : non-numeric argument to binary operator</p>
  </blockquote>
  
  <p>Any help will be greatly appreciated!</p>