title: Append 0 to missing observations in a dataframe.
body: <p>I have a dataset where I expect a fixed number of observations in a data-frame</p>
  
  <pre><code>A 20
  B 10
  C 5
  </code></pre>
  
  <p>However, upon running my analysis this is not always the case sometimes I find missing observations and the resulting dataframe looks like this</p>
  
  <pre><code>A 10
  C 5 
  </code></pre>
  
  <p>In this case there are no observations for B. I would want to append 0 observations to the final dataframe before ploting so as to indicate the values of the missing  observation. </p>
  
  <p>final data frame should look like this</p>
  
  <pre><code>A 10
  B 0
  C 5
  </code></pre>
  
  <p>How can I accomplish this in R? </p>