title: How to calculate the specific rate among three classes?
body: <p>I'm trying to calculate the survival rate with the data frame 'Titanic'. </p>
  
  <p>I have filtered a object named "Male_adult_passengers", whose vector 'Class' includes three ranks. </p>
  
  <p>There is another column recording the condition of survival ('yes' or 'no')</p>
  
  <p>And I would like to get the survival rates within different classes and compare them.</p>
  
  <p>I applied the dplyr package and tried coding as:</p>
  
  <pre><code>Male_adult_passenger %&gt;%
    group_by(Class) %&gt;%
    summarise(S_rates = count(Survived = 'Yes')/count(Survived))
  </code></pre>
  
  <p>But only turned out an error message:</p>
  
  <pre><code>Error in group_vars(x) : argument "x" is missing, with no default
  </code></pre>
  
  <p>What does this message mean? And how can I get the survival rate needed?</p>
  
  <p>Thank you very much.</p>