title: Function to Calculate Sample Size Across a Range
body: <p>I'm trying to work with the power.prop.test built in function in R to take a data set like the following:</p>
  
  <pre><code>Test  P1  P2       Population
  1     0.1   0.11   1000
  2     0.1   0.12   1500
  </code></pre>
  
  <p>and use the power.prop.test function co calculate the n for each Test scenario. I thin want to divide the population by the n to get rounded down whole number max test scenarios like this:</p>
  
  <pre><code>Test  P1  P2       Population    n     Max Tests
  1     0.1   0.11   1000          450   2
  2     0.1   0.12   1500          335   4
  </code></pre>
  
  <p>I think I need to iterate over the power.prop.test function and extract the n from each iteration and append it to a table, but I'm not sure how to proceed. Any and all help will be greatly appreciated.</p>