title: Using output of summarise() in R
body: <p>How do I use the output of the summarise() in R. I know it creates a table, but I can't seem to use it for further calculations.
  I'm trying to calculate the margin of error for a sample proportion.</p>
  
  <pre><code>us_pro &lt;- us12 %&gt;%
     summarise(us_prop=sum(response == "atheist")/sum(response == "atheist" | response == "non-atheist"), n=n()) %&gt;%
      as.data.frame()
  
  
  us_pro %&gt;%
    me_perc=qnorm(0.975)*sqrt(us_prop*(1-us_prop)/n)
  </code></pre>
  
  <p>The ME calculation errors out with </p>
  
  <blockquote>
    <p>Error in eval(expr, envir, enclos) : object 'us_prop' not found Calls:
     ... handle -> withCallingHandlers -> withVisible -> eval
    -> eval Execution halted</p>
  </blockquote>
  
  <p>I'm guessing it's a very basic error, but i can't understand what</p>