title: How to convolve a vector with itself n times
body: <p>Suppose I have a vector x which I want to convolve with itself n times. What is the good way to do this in R?</p>
  
  <p>Suppose that we already have a function conv(u,v) that convolves two vectors.</p>
  
  <p>I can do this:</p>
  
  <pre><code>autoconv&lt;-function(x,n){
      r&lt;-1;
      for(i in 1:n){
          r&lt;-conv(r,x);
      }
      return(r);
  }
  </code></pre>
  
  <p>is there a more efficient way?</p>