title: bootstrap proportion confidence interval
body: <p>I would like to produce confidence intervals for proportions using the boot package if possible. 
  I have a vector and I would like to set a threshold and then calculate the proportions below the specified level.
  After that I would like to use the bootstrap function in the boot package to calculate the confidence intervals for the proportions. 
  Simple example of what I have so far:</p>
  
  <pre><code>library(boot)
  
  vec &lt;- abs(rnorm(1000)*10) #generate example vector
  
  data_to_tb &lt;- vec
  
  tb &lt;- function(data) {
    sum(data &lt; 10, na.rm = FALSE)/length(data) #function for generating the proportion
  }
  
  tb(data_to_tb)
  
  boot(data = data_to_tb, statistic = tb, R = 999)
  quantile(boot.out$t, c(.025,.975))
  </code></pre>
  
  <p>However, I get this error message:</p>
  
  <pre><code>&gt; boot(data = data_to_tb, statistic = tb, R = 999)
  Error in statistic(data, original, ...) : unused argument (original)
  </code></pre>
  
  <p>I can not get it to work though, help appreciated</p>