title: Rowwise proportion test and add p value as new column
body: <p>My data:</p>
  <pre><code>c5 =structure(list(comorbid = c(&quot;heart&quot;, &quot;ihd&quot;, &quot;cabg&quot;, &quot;angio&quot;, 
  &quot;cerebrovasc&quot;, &quot;diabetes&quot;, &quot;pvd&quot;, &quot;amputation&quot;, &quot;liver&quot;, &quot;malig&quot;, 
  &quot;smoke&quot;, &quot;ulcers&quot;), AVF_Y = c(626L, 355L, 266L, 92L, 320L, 1175L, 
  199L, 89L, 75L, 450L, 901L, 114L), AVG_Y = c(54L, 14L, 18L, 5L, 
  21L, 37L, 5L, 7L, 5L, 29L, 33L, 3L), AVF_tot = c(2755L, 1768L, 
  2770L, 2831L, 2844L, 2877L, 1745L, 2823L, 2831L, 2823L, 2798L, 
  2829L), AVG_tot = c(161L, 61L, 161L, 165L, 166L, 167L, 61L, 165L, 
  165L, 165L, 159L, 164L)), row.names = c(NA, -12L), class = &quot;data.frame&quot;)
  </code></pre>
  <p>I want to perform a <code>prop.test</code> for each row ( a two-proportions z-test) and add the p value as a new column.</p>
  <p>I've tried using the following code, but this gives me 24 1-sample proportions test results instead of 12 2-sample test for equality of proportions.</p>
  <pre><code>Map(prop.test, x = c(c5$AVF_Y, c5$AVG_Y), n = c(c5$AVF_tot, c5$AVG_tot))
  </code></pre>