title: How to get the mean age of people with sex = na
body: <p>I am very new to R and hope that someone could answer me.</p>
  
  <p>There are two variables in the data, i.e. sex and age. 
  There are female, male, na under the column sex and there are different ages under the column of age.</p>
  
  <p>Is there a way to get something like</p>
  
  <pre><code>       sex          mean age
  
       female         mean age of female
        male          mean age of male
         na           mean age of na
  </code></pre>
  
  <p>Thanks a lot!</p>